Secure Copy or SCP is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. It is based on the Secure Shell (SSH) protocol.

learn more… | top users | synonyms

1
vote
5answers
479 views

Fast Internet Backup

We wish to install some servers in a remote datacentre to act as a backup storage location for our primary datacentre. Assuming that both sites will have GigE connectivity, what is the best method to ...
3
votes
3answers
5k views

Use scp to copy a file to different servers

I have to copy a file to different servers almost every day. What I usually do is: scp filename user@destinationhost:/destination/folder I run this same command changing the destination host over ...
0
votes
2answers
482 views

Download big files from ESXi?

I want to move one of my vm guest between two ESXi servers. I can't do this with converter or Veaam FastSCP because I'm in another network and using this tools is extremly slow. So I'm trying to copy ...
2
votes
2answers
2k views

scp to AWS EC2 - error - “Please login as the user ”ubuntu“ rather than the user ”root“.”

I'm trying to scp a file to /var/www because I'm playing with apache. To move the file I do scp -i <ec2-shh-key> localfile root@<ec2-instance-ip>:/var/www/fileremote. But this gives me an ...
2
votes
1answer
449 views

Limit scp (with sshd on centos) speed / rate

I'd like to let users download / upload files via scp to my centos 6.0 system, it's connected to lan via Gigabit ethernet, but I don't want transfers to flow at that speed. I want to limit the speed ...
3
votes
7answers
7k views

Copying huge files between two remote machines - Efficiently

I have a shell script which keeps on copying huge files (2 GB to 5 GB) between remote systems. Key based authentication is used with agent-forwarding and everything works. For ex: Say the shell script ...
-1
votes
1answer
199 views

does scp affect performance

I am using scp to copy a file from remote server to local and it is working as expected. scp remote_server.com:/data/ar_uw2a_vol_0286036c_2012-04-24-05-35-00 . I have 2 questions: 1) Since I am ...
0
votes
1answer
409 views

cygwin scp to linux box corrupts files, while winscp fixes the corruptions?

I have a bash script for deploying my app jars and sh files from the dev machine to prod machine (centos). it simply calls scp and copies all the necessary files. when I run it from an ubuntu box, ...
2
votes
1answer
4k views

VMware seems to throttle SCP copies, what can be the reason?

I seem to have a strange issue with my VMware cluster, where I get inconsistent SCP transfer rates. I have Cluster1 and Cluster2, physically in different regions. I need to transfer large vmdk from ...
3
votes
3answers
278 views

SCP overwrites files with dollar signs

I have this files: A.class A$1.class A$2.class And a bash script with something like: for i in *; do scp "${i}" foo@bar:/tmp/; done This works fine. All three files are copied. The problem ...
1
vote
1answer
395 views

Using command in ssh authorized_keys breaks scp

I would like to use command per key in authorized_keys to set some environment variables. command="MYVAR=test $SHELL" ssh-rsa mykey Shell works fine but scp is not working. What would be the ...
0
votes
0answers
44 views

How write .sh script to remote copy files between linux [duplicate]

Possible Duplicate: How to pass password to scp command used in bash script? when use scp to remote copy file between servers then type "YES" and "PASSWORD" I don't know how to auto type ...
4
votes
2answers
5k views

preserve permission with scp

SCP does not seem to preserve ownership stamps even if used with -p option. scp -p /mysql/serv/data_summary.* some_server:/mysql/test/ The files are owned by mysql and I want the same ownership to ...
0
votes
1answer
360 views

scp (ssh) fails the first time, works the second time

We have a debian testing server. When I am trying to access the server with scp it doesn't work the first time - the client says, that the remote host closed the connection. When i try the same action ...
1
vote
2answers
343 views

Script SCP without certificates or expect

I need to script SCP and I need to be able to do this by passing in the password in plain text. I am absolutely aware of the horrible design pattern that I am asking for. I cannot use certificates for ...
-1
votes
2answers
191 views

Transfer files on SSH to Desktop [closed]

Based on the tutorials I've browsed through: This is the Linux scp command syntax to retrieve file or directory from a remote computer: scp -r [login name@ip address] : [/path/filename] . So ...
0
votes
1answer
2k views

Force SFTP/SCP to copy files with a remote directory's permission

I am having a problem with SFTP and SCP where files that are copied are not inheriting the permissions of the remote parent directory. I have seen similar questions on serverfault where the umask of ...
15
votes
4answers
11k views

How to _MOVE_ files with scp?

How to not copy but move files from one server to another (both Linux)? man scp didn't give me anything useful. I cannot use 'scp' then 'rm' because I must make sure the file is successfully ...
2
votes
3answers
3k views

ssh login successful, but scp password gives me “Permission denied”

I'm trying to get some blogging software up on an organizational remote server. I tried to set up a SSH Key but was having problems and decided that getting the blog up and running was more important ...
0
votes
2answers
979 views

How to use directory autocompletion with scp

I use the authorized-key to log into my remote ubuntu server. I need to use scp frequently to cp files from my local machine to my remote machine. I want to enable the autocompletion as I did with my ...
1
vote
1answer
552 views

How to use ssh to copy a file multiple hops with agent forwarding?

I have a group of servers all properly configured with SSH agent forwarding. It is a typical bastion server style configuration where the only machine you can connect to from the outside is server A. ...
2
votes
4answers
1k views

SSH not seeming to run in bash script called via web server

I have a simple shell script that: Makes a directory on the remote machine. Copies a .epub file to the remote machine's new directory. Runs kindlegen to convert the .epub to a .mobi. The remote ...
1
vote
3answers
678 views

Estimating the time needed to copy a big file

I have to copy a relatively big file (6GB) to another server. To enforce consistency, I have to 'lock' this file and not use it during the transfer. I obviously want to minimize this downtime, but ...
1
vote
3answers
2k views

change scp default directory in `~/.ssh/config`

The scp (openssh) command accepts relative paths as host:path/ which are relative to the home directory on the host. I would like to change location of the default directory. For example, I would ...
0
votes
1answer
128 views

SCP - Traditional Web Server to EC2 Instance

I am setting up a backup server instance on EC2 with a public dns for its IP so that other servers on hostgator with dedicated IPs can send files to it. I am confused as to how to use SCP with EC2 ...
0
votes
3answers
2k views

Trying to SCP from Local Mac to Amazon AWS Linux Machine

I am trying to copy a file from my local Mac to my Linux instance running on the Amazon EC2 / AWS Cloud. I am able to connect to the server via Terminal, but am unable to get my file up to the ...
1
vote
3answers
118 views

How To Setup A Centralized Repo To Distribute Files To Servers

Assume I have dozens, even hundreds of servers. What is the best method of pushing a central copy of files to a given directory to all servers? Example, we update a bash script, and put it on a ...
5
votes
3answers
2k views

How to copy large (> 1 million) number of small files between two servers

I need to migrate about 1TB of data comprised of smaller files (most under 100KB) to another server. I've not even completely enumerated the files but estimates are between 1-2 million. The ...
0
votes
1answer
172 views

OpenSSH scp restrictions a-la gitolite

Does anyone know of some software that would allow to restrict/tune the scp experience on a single unix user, based on SSH keys? Similar to what gitolite does, or more flexible what rssh can do, but ...
2
votes
3answers
2k views

How do I SCP keypairs from one Amazon EC2 instance to another instance?

I am trying to SCP cert. between my two instance and having some trouble. Here is what I am entering. [ec2-user@ip-xxx-xx-xx-xx ~] scp -i .ssh/key.pem /root/.ssh/id_rsa.pub ...
3
votes
5answers
9k views

How do I SCP file between two Amazon EC2 server?

I am on Amazon AWS and I have two EC2 instance on my account. Trying to send rsa key via SSH to another EC2 instance using internal private IP. But its not working. scp -i .ssh/id_rsa.pub ...
0
votes
5answers
453 views

duplicity can't find remote backup directory?

Using my private key to do so, this command allows me to connect to /home/backupUser/backup just fine: $ sudo sftp -oPort=7843 backupUser@192.168.x.x:backup However when I run duplicity, I get ...
0
votes
3answers
289 views

Copying files SSH vs sFTP [closed]

I'm a bit of a unix noob, but this question seems super basic, yet I can't find an answer anywhere. Basically, to my knowledge, sFTP is just FTP over ssh. So, why can't I drag and drop files from ...
2
votes
1answer
79 views

getting a list of files from secure server

i am trying to get a list of files from secure server to compare them (using diff) to the ones i modified on local version (unfortunately the company i work in is not using subversion nor git yet) i ...
4
votes
1answer
3k views

scp without known_hosts check

Is there any chance to skip the known_hosts check without clearing known_hosts or disable in ssh.conf? I neither have access to known_hosts nor ssh.conf yet. Don't find any suitable in man.
1
vote
3answers
9k views

WinSCP - SCP is working and SFTP is not working

I am trying to connect to our remote server using winSCP. It was working before. But from today I am not able to connect to the server using SFTP. If I changed the protocol to SCP, then I am able to ...
4
votes
2answers
3k views

scp returns “unexpected <newline>” error

I am trying to scp a file from a server to my local machine, but it is giving me this error: protocol error: unexpected <newline> This is my syntax: scp user@server:/path/to/file . It did ...
4
votes
4answers
2k views

Running multiple scp threads simultaneously

Running multiple scp threads simultaneously: Background: I'm often finding myself mirroring a set of server files a lot, and included in these server files are thousands of little 1kb-3kb files. All ...
0
votes
1answer
219 views

SSH/SCP filebrowser supporting server hopping

To access our file server here, I need to connect first to a server which is public available and then open a second ssh connection to that server. If I need to copy files, I first need to copy them ...
2
votes
3answers
2k views

How to avoid stalled scp transfer when tunneling through a gateway over ssh?

I'm try to transfer a large (1GB+) file from one machine to another, but I have to tunnel through a gateway in between. I'm able to transfer small files just fine. However, with the big file, the ...
19
votes
6answers
159k views

How to pass password to scp command used in bash script? [duplicate]

Possible Duplicate: Connect through SSH and type in password automatically, without using a public key I have a bash script that makes dump of DB then copies file from one server to another ...
0
votes
2answers
3k views

How can I ensure non-corrupt file transfer in linux?

I have script scheduled with cron that transfers a file around to other machines using scp filename user@host:~ and today have noticed that sometimes the md5 of the files don't match. Upon closer ...
2
votes
2answers
1k views

User created MOTD prevents SCP from functioning

I've created custom MOTDs to be displayed at login via SSH by doing the following: create a text file in /etc/usermotd/<username> with the message inside Edit the user's .bashrc file and put ...
0
votes
2answers
242 views

Copying file from remote server to my ubuntu desktop

I have confused how to do that. someone tell me to use scp but it still unclear for me. I just can control the server using ssh. I did like: qa-desktop2@qa-desktop2:~$ scp ...
3
votes
6answers
1k views

Transfer a file from remote server A to remote server B from server C

I have an interesting problem I'm trying to solve. I have a JumpBox server that I have in order to securely ssh into client's servers. This is the only server my clients ever open up port 22 to. ...
1
vote
2answers
868 views

SCP does not completely transfer file

I am trying to transfer a large (1.5 GB) text file using SCP. While the transfer finishes normally, only 1.4 GB are transferred. Is there any reason for this incomplete transfer. I am on Ubuntu 10.04
1
vote
2answers
2k views

Why does SCP write 0 bytes in this case?

I'm trying to copy my ssh key from my local vm to another box, everything seems to work ok, but when I check the remote box the file isnt there... Transferred: stdin 0, stdout 0, stderr 0 bytes in ...
0
votes
1answer
649 views

How To set up SCP from localhost to remote Ubuntu server - Part 2

I am trying to configure an ubuntu vps. I have set up ssh secure login using rsa public and private keys from a local machine. As well as disabling root login I have also set up iptables and ...
2
votes
1answer
742 views

How To set up SCP from localhost to remote Ubuntu server

I am trying to configure an ubuntu vps. I have set up ssh secure login using rsa public and private keys from a local machine. As well as disabling root login I have also set up iptables and ...
2
votes
2answers
679 views

Transfer large files over the internet from a Linux VPS to Windows machine

I regularly need to transfer files that are a few gigabytes in size from a Linux VPS to my home Windows machine. I am trying to find a transfer method that fits my needs. FTP/SFTP works but is quite ...