Secure Copy or SCP is a means of securely transferring computer files between a local and a remote host or between two remote hosts.

learn more… | top users | synonyms

1
vote
0answers
47 views

Copy directory with SCP

I'm trying to copy directory from local drive to remote server with -r parameter, however I'm getting: scp: System error: 1633648 (Failed to retrieve error string (err:317)) This is the syntax I ...
0
votes
1answer
3k views

Why does scp say “No such file”?

I have a bash script that uses scp to copy a file from my machine to another. The script keeps on exiting after I enter the SSH password with the error: <filename>: No such file or directory ...
3
votes
1answer
21 views

Limit maximum number of concurrent scp processes running on a host

I am facing a problem where I have a fleet of servers which contain a lot of data. Each of the host runs many instances of a specific process p1, which makes several scp connections to other hosts in ...
1
vote
1answer
27 views

scp a file from one server to another one, got “permission denied”

source server IP 162.244.xxx.xxx file -rwxrwxr-x 1 user1 admin 36005278 Sep 10 2013 filename.tar at destination server scp user1@162.244.XXX.XXX:home/filename.tar ./ got a Permission ...
0
votes
2answers
375 views

Copy a file from a remote server to windows home using scp

Is there a way to copy a file from a server to a local folder (i.e. My Documents)? can it be done by scp? I have this script that generate some list. I want this script to automatically copy the ...
1
vote
1answer
48 views

Curl failed to read known_hosts file

I'm trying to download a file from a Centos 6 server using another Centos 6 server as client and curl with the scp protocol and I'm getting this error output: $ curl -v -O scp://cz/path/to/file * ...
1
vote
1answer
50 views

sftp command to get/download .tar.gz file

I thought I was familiar with sftp commands in unix and upto my knowledge the command to used to download a compressed file from the server is sftp get filename.tar.gz But when I tried this ...
3
votes
3answers
226 views

SCP command with selected file and directories for download ask's for password for each new file or directory

On my Fedora 20 system I use scp a lot, and this is the second time I encounter this, when I run this command: scp -r -P PORT user@host:/home/user/something/{file1,folder1,folder2,folder3,folder4} ...
2
votes
3answers
41 views

Copying a file using SSH over a tunnel with cert forwarding

I need to find a way to copy files from mymachine to a server priv-server sitting on a private NATted network via a server pub-server with a public IP. The behind-NAT machine priv-server only has ...
1
vote
4answers
92 views

Interactive ssh works, but not rsync or scp, on OSX

The motivation is that there's a server that I can ssh into (with or without key pairs set up ... i.e., without or with a password) but that I cannot send files to via rsync, scp, or sftp. Someone ...
2
votes
1answer
23 views

Only transfer updated portions of a file

I do simulations on large supercomputers, and the files I produce are on the order of 5 GB to 1 TB. But I frequently like to monitor the progress of the simulation using a visualization program on my ...
5
votes
3answers
1k views

Transfering millions of files from one server to another

I have two servers. One of them has 15 million text files (about 40 GB). I am trying to transfer them to another server. I considered zipping them and transferring the archive. But I realized that ...
2
votes
4answers
7k views

Copying files from one machine to another without asking for password

I am currently using this command. I am on another machine (ip1) scp file.txt root@ip2:/home/praveen/test.c /home/praveen The command will prompt for password. I use it in some shell scripts, and ...
0
votes
1answer
30 views

Why scp with compression takes longer than without compression

I was playing around and noticed that secure-copying with compression takes longer than without compression time scp -C ./test.sql user@vmware:/home/user real 0m42.758s user 0m40.455s sys ...
9
votes
4answers
14k views

How to copy with SCP between two servers using key auth?

I can log in via SSH using key authentication to SERVER1 and SERVER2. However, I can't copy files between the two servers. Why? How can I copy between them? (the data that I have to copy is bigger ...
2
votes
3answers
701 views

scp and umask setting

How do i make SCP respect umask ? Ive tried adding this Subsystem sftp internal-sftp -u 0002 in /etc/ssh/sshd_config and session optional pam_umask.so umask=0002 in ...
2
votes
1answer
925 views

Transferring Files SSH SCP Error Message: 'Stdin: is not a tty'

I am using a Macbook SSH terminal and generated RSA key pairs and uploaded remote id_rsa.pub with approved permissions. I can connect with remote Apache web server. I can create, open, move, modify ...
11
votes
5answers
4k views

Does a `scp` transfer close when I close the shell?

I have scp transfer (from one remote server to another), that is quite big. So maybe I want close the computer from which I executed this command, will this end the transfer? I have ssh access to ...
8
votes
4answers
4k views

scp from one remote server to another remote server

I have one big file on server one and I want to copy it to server two using scp. I have the keys setup properly and I can ssh/scp to both servers from my desktop. The file I need to copy is larger ...
12
votes
2answers
7k views

SCP fails without error

I've been experiencing very strange behavior of SCP for some time: whenever I try to copy a file, the output of SCP contains a bunch of underscores and the file is not copied. $ scp test.txt ...
2
votes
2answers
56 views

Copying Files Through Two Layers of SSH from Windows

The place I work has a login server, and then I login to a Linux box from that login server. As in, ssh login@host ssh computer_name providing authentication each time. If I'm working from my ...
3
votes
3answers
218 views

How to copy, execute and retrieve data from a remote computer?

I am trying to run some calculations on a remote computer. Basically I want to copy some files to the computer, load a software, execute the calculation, then retrieve the data back. I have created a ...
11
votes
3answers
911 views

scp between two servers not in the same network

There are two server that I can access with 2 different VPN connections. I have managed to have both VPN working on the same time on my machine (a bit of routing rules). I want to do a scp ...
0
votes
2answers
220 views

scp with password and renaming the file [closed]

I need to execute scp command with renaming the file. I have tried with following code: HOST=lnx25 USERNAME=ngqa PASSWORD=xxxxx FILE=$1 FILE_NAME=`echo $FILE | awk 'BEGIN{FS="/"} {print $NF;}'` ...
0
votes
2answers
47 views

When executing a script via ssh, how can I transfer variables back to the PC issuing the cmd?

I'm writing a pretty simple script that will SSH into the machine of my choice, run a script to obtain things like the number of users logged in, CPU averages, etc, and write it to a file on the PC ...
2
votes
1answer
33 views

scp (v4) copy from remote to multiple local filenames

I did a bunch of googling and I think what I am trying to do is not possible with openssh/scp v4.x but wanted to ask here in case someone has a creative workaround. I want to copy multiple files from ...
4
votes
1answer
74 views

Running scp when .bashrc of remote machine includes source command

I cannot copy a file over scp when the remote machine .bashrc file includes source command to update paths and some variables. Why does it happen?
0
votes
1answer
21 views

Convenient way to upload a file to a server's application directory?

I very often need to upload some kind of file to a server, to put some application directory somewhere. Since my user account is of course unprivileged, I generally have to do this: scp file.txt ...
1
vote
2answers
88 views

how to scp to host connected on a wifi?

I have my MAC on a wifi and am connected via ssh to a linux host. I want to copy some files from the linux host over to my MAC. I know, I can simply run scp on the mac to fetch each file via mac> ...
1
vote
1answer
154 views

How can I return a specific error code at this point in my TCL script?

I have a TCL expect script that runs a scp command for uploading a config file to my DNS server: #!/usr/bin/expect -f set config "~/dnsmasq.conf" spawn /usr/bin/scp "$config" ...
4
votes
1answer
195 views

Bash script for scp interpreting tilde (~) too soon

So, I just started a new C++ class that requires me to program in a Linux environment. I don't have Linux installed on my machine, but I do have OS X and I can ssh into a linux machine in the lab at ...
1
vote
2answers
4k views

Java code to copy files from one linux machine to another linux machine

I'm looking for java code to copy files to a remote linux system. I have tried Runtime.getRuntime().exec() function by passing an scp command, but each time I run the program it is asking for the ...
1
vote
0answers
46 views

Pause at the end of `scp` transfer: from OSX or FreeBSD to Ubuntu

I make binary images for the releases of a freeware program for about seven platforms, with the help of VirtualBox images. The images are copied via scp to an Unbuntu system. I've noticed that from ...
2
votes
3answers
2k views

Suppress server message in rsync

When I rsync or scp from a particular server I get a rather long message telling me the rules of the server. However when I setup regular pulls, I'd like to be able to suppress those messages in my ...
2
votes
2answers
3k views

How to make scp respect umask

My scp doesn't respect umask setting of the user it's sending files to. Is there a setting somewhere or should I use a different solution?
3
votes
3answers
459 views

How do I copy a file with scp with special characters?

I am trying to copy a file that has colons and periods, e.g., with: scp "test.json-2014-08-07T11:17:58.662378" remote:tmp/ scp test.json-2014-08-07T11\:17\:58.662378 remote:tmp/ and combinations ...
4
votes
2answers
1k views

Copy files from remote server to local, ignoring existing files (rsync not available)

I would like to copy a directory of files from a remote server to my local machine. As it is a large number of files, the option of ignoring existing files is desirable. Unfortunately, rsync is not ...
4
votes
2answers
707 views

How to pipe a remote file to stdout over scp or sftp?

Using ssh, it is easy to print the contents of a file using ssh host 'cat file.txt' When ssh is disabled, and only SFTP is enabled, running the previous command gives the following error: ...
3
votes
2answers
218 views

transfer a file to remote dir only if doesn't exist without replacing

I'm using CentOS linux. In one line cmd, that returns 0 if success, non-0 if failure, I need: Transfer a file to a remote server. Don't transfer the file if filename exists in remote server ...
3
votes
1answer
316 views

scp does not transfer files correctly

I am using scp to transfer some large files (> 1 GB) from my laptop (Ubuntu 12.04) to my desktop (Ubuntu 14.04). The laptop has a wireless connection to my router and the desktop has a cable ...
1
vote
1answer
264 views

Using scp to transfer files to an android device

I have a file on a remote server that I want to transfer to my android device over ssh, only using the android device in the process. Using this setup, I tried an scp from the android device ...
1
vote
2answers
204 views

scp and file owner

What are the reasons that could make a change in a file ownership after scp'ing it from one server to another? The file ownership changed from 'owner' to 'apache'. I used scp -p . The user 'owner' ...
0
votes
5answers
129 views

Downloading file through SSH with a “proxy” machine inbetween

I need to download a file from machine C to machine A. To do that, I need to login to machine B (I am doing this using scp), as I cannot access C directly from A. Would it be possible to download a ...
1
vote
2answers
198 views

SCP Automation in production environment [duplicate]

I want to implement the use of scp command in a production environment. I don't want to provide my password in the automation script. Is there any way? I need step by step solution.
1
vote
2answers
565 views

Shell Script - how to scp into remote server and download files and protect password

I have a remote server that I need to download Apache logs from. I can manually scp into the server and get the files, but I'd like to put this in crontab. The only way to automate it is to include ...
2
votes
5answers
4k views

Changing user while scp

I need to copy file between Linux machines. The problem that the user I use to login (myuser), is different from the user that can access the file. If I just ssh to the machine, I can switch the user ...
2
votes
3answers
1k views

How to upload a file from Windows to Linux?

I'm using Windows. I want to upload a file to Amazon server using putty from my Windows system. How to do this using scp or any other command? How do I download a file from the Amazon server to my ...
3
votes
3answers
248 views

What perl script will scp directory with spaces in name?

I"ve been trying for several hours to figure out how to get perl to scp a directory with a space in the name. I'm currently getting the error scp: ambiguous target Here is the script that is not ...
1
vote
5answers
237 views

How to copy a file from a remote network to the local desktop

So I used SSH to remotely login to another computer on a network. I have many files that I would like to copy over to my local desktop. I am trying to follow this How-to : However, I think one ...
2
votes
3answers
3k views

How to launch two threads in bash shell script?

I am trying to copy files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for ...