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
3answers
62 views

scp to copy file to remote server fails because of permissions

I think my fundamental problem is that I don't fully understand how ssh / scp works. But I don't what to google to try to read up on my question. Problem Description I have created a bash script ...
1
vote
3answers
52 views

Error when passing string to scp in for loop

I'm grabbing file list from server via find via ssh for f in `ssh -p ${SSH_PORT} -l ${SSH_USER} ${SSH_HOST} -t "find ${DIR_REMOTE} -type f | grep jpg" 2> /dev/null` When I echo the list in the ...
1
vote
3answers
348 views

How do you manage ssh keys to add a second user?

I used this article to set up keys and a user to login to a Ubuntu server from a Windows box using Putty. I would now like to add an additional ssh user that will login from a MacBook. I used ...
0
votes
0answers
3 views

scp from remote to local, where is my file? [migrated]

I'm copying (or at least trying) a file from a remote server to my local pc using the following command: scp user@host:/usr/filename.txt / It copies the file, but I have no idea where it is. What ...
1
vote
7answers
1k views

Secure file transfer in linux without SSH?

First thing i want to apologize if this question is silly or something...i just tried to research but it seems to be a bit hard to find exactly what i want in Google ! [or i'm not smart enough to find ...
4
votes
5answers
13k views

Copy multiple folders to a single destination with robocopy

I'm looking for a solution to use robocopy to copy several folders from a directory onto a distant network share. I want to choose several folders out of a directory that contains hundreds of folders ...
1
vote
1answer
29 views

ssh and scp redirects to my own server

recently I've installed a new server, and got a lot of problems with the ssh access. Now, when I try to scp from server A ( old, Debian 7.1 ) to B ( new, Debian 7.1 ), or when I try to ssh from A to ...
-2
votes
1answer
3k views

How to scp file to remote servers' root directory and run sudo commands?

NOTE: The servers does not share the same password but I will setup no-password login at first. Here's the use case, I need to do these below step by step in my deploy.sh: scp files to remote ...
2
votes
2answers
1k views

Why is FileZilla SFTP file transfer max capped at 1.3MiB/sec instead of saturating available bandwidth? rsync and WinSCP are even slower

I'm downloading from a server and downloads are maxing out at 1.3MiB/second with FileZilla but I can start concurrent downloads and they will download at 1.3MiB/second also. So why can't I download ...
0
votes
0answers
26 views

Copy .pub keys to Gitolite Server, university environment

I am a new Technical Officer for a South African university, and being a bit green, I'm not sure if this is the perfect place for this. Please let me know if it is not. The problem I have a Gitolite ...
-1
votes
1answer
19 views

Why does scp congest my network?

I observe a weird behaviour when I copy files to a remote machine using scp. Take for example this scp command with no special options: scp my.phar remote:apps/ Copying works flawlessly, however my ...
6
votes
2answers
12k views

Why is scp not overwriting my destination file?

I'm trying to back up a file via the command scp /tmp/backup.tar.gz hostname:/home/user/backup.tar.gz When I run it, the scp progress bar shows up and it looks like its transferring the file, ...
4
votes
8answers
79k views

SCP copy windows local file to linux remote folder

How to get a file from my path d:/test.txt and copy it to /etc/var/test/test.txt I've tried this: scp d:/test.txt /etc/var/test/test.txt but that didn't worked, how to set the hard disk from where ...
-1
votes
1answer
99 views

Jenkins execute shell scp

I have a Jenkins build where I am trying to copy a war file from one vm to another. I want to do this using scp. I've tried running this in the shell outside of Jenkins and everything works fine. ...
252
votes
8answers
285k views

Can scp copy directories?

Now I can only copy a single tar file,how can I copy directories recursively with scp?
3
votes
1answer
72 views

Why is scp so slow on my network?

scp is slow in our company network. For testing, I am copying a file from a remote server which is connected via IPsec between the routers. When using scp -vv I get lots of messages like this: ...
0
votes
1answer
67 views

How to maintain ssh connection for multiple scp transfers?

I'm using the scp command to copy files from my local machine (ArchLinux) to my server (CentOS 6.5). But for each scp command a new connection is established and although I'm using SSH keys for ...
5
votes
5answers
5k 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 ...
-1
votes
1answer
25 views

Can scp maintain original file structure on remote server?

Supposing we have the following files to copy to a remote server: /dir/test.php /dir/inc/inc.php I now want to copy both files to the remote server as follows: cd /dir/ scp test.php inc/inc.php ...
1
vote
1answer
27 views

vsftpd server allows different permissions than ssh

I setup a vsftpd server on Debian 8.2, and haven't changed anything in the config file except for local_root=/. When I try to upload a file using Filezilla to a directory I have group write ...
22
votes
5answers
18k views

Difference between scp and sftp

What is the difference between sftp and scp?
-4
votes
2answers
64 views

Moving files from one linux server to another using scp [closed]

I want to move some files from one server to another . I want the public_html directory from server 1 to be transferred to server 2 . Can anyone give me the syntax to do so ? rsync keeps crashing my ...
32
votes
5answers
31k views

How to make scp copy hidden files?

I often use SCP to copy files around - particularly web-related files. The problem is that whenever I do this, I can't get my command to copy hidden files (eg, .htaccess). I typically invoke this: ...
0
votes
1answer
210 views

Connection timed out when trying to SCP from one EC2 instance to another

I'm trying to SCP from one ec2 instance to another (via SSH client). Both server use the same keys. My initial investigation into this led me to believe this would all be possible by using ...
0
votes
1answer
25 views

Compressing and streaming files from a linux server

I have a linux server with a lot of unused files, but it is low on disk space. I'd like to take a copy of the files before deleting them. There is not enough disk space to store the compressed version ...
0
votes
3answers
106 views

How to transfer 6 TB files using SCP?

I have 2 Linux Centos Servers. The First one is 6.7 and the second one is 7. How can I transfer all files and folders from /home/sv1/public_html from server 1 to /home/sv2/public_html in server 2 ? ...
0
votes
1answer
85 views

scp hangs after successful file transfer in CentOS 7 VM?

I have 2 CentOS7 VMs running under VMware Esxi 6. On one of them, when I successfully complete a new SCP file transfer, the system hangs for about 2- 5 minutes (and sometimes indefinitely until the ...
11
votes
3answers
33k views

Can I scp a folder that has sub folders?

I have a folder that contains files for a static website like: /site/index.html /site/css/css.css /site/js/js.js /site/images/... If I update something on my laptop, I want a single command to send ...
2
votes
0answers
550 views

How to prevent SSH freezes over an openvpn client to client connection

I have the exact same issue as the one described here, but I cannot request clarification from the author, since I am a new user and I cannot post a comment on that, so I am posting a new question (I ...
2
votes
2answers
7k 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 ...
1
vote
4answers
4k views

Linux SCP File transfer No space left on device?

I am trying to transfer one zip file from a linux based machine to a Windows based using SCP. I can go through the transfer ok but when it completes it says "No space left on device". The ...
1
vote
3answers
2k views

scp - Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

Trying to copy files over from serverB to serverA and get the following error: root@server:~# scp /root/test.txt root@111.111.111.111:/home/somefolder/ Permission denied ...
38
votes
9answers
30k views

Allow SCP but not actual login using SSH

Is there any way to configure a user on a Linux box (Centos 5.2 in this case) so that they can use scp to retrieve files, but can't actually login to the server using SSH?
-1
votes
1answer
33 views

rsync - file is 8 bytes larger on recipient

I have a file that I have tried transferring across the wired LAN via both scp and rsync, and both have yielded the same result. When I run du file on the file after the transfer, the file is 8 bytes ...
2
votes
4answers
31k views

howto copy files on esxi datastore using scp?

how to copy files on esxi4 datastore (fs=vmfs) over network using console (SSH)? giving up older question:have seen on vmware forums that its not possible have a USB drive NTFS attached to ESXi4 ...
1
vote
2answers
44 views

Copy VM folder from ESX 3.0.1 host

I am in need of the ability to copy files/folders from an ESX 3.0.1 datastore. Unfortunately, this version does not allow this via the VI client, and as such I have been looking to do this using ...
2
votes
3answers
1k views

Why does my local network transfer speed decrease with larger files?

Short version: I have a Linux server (RHEL5) and a Windows 7 Professional laptop on a local wired network. Copying large files to the server gets gradually slower until it stops completely. Long ...
0
votes
3answers
124 views

Strange behavior of SCP through .sh file

I'm hitting a strange issue with SCP on cygwin, scp $HOME/deploy.sh user@host:/tmp works fine, files get copied to the remote system. But the same command inside a test.sh won't work. I can see ...
0
votes
1answer
104 views

What are the ways to control banners on solaris 10 for scp?

I work with a farm of solaris 10 servers with some inconsistent behaviors in terms of displaying banners/motd. This time, I am trying to do scp from one server to another. Between some servers I get ...
0
votes
0answers
90 views

Capistrano change SCP to SFTP setting

I tried to set up a simple capistrano deployment, and get the following error when deploying: SSHKit::Runner::ExecuteError: Exception while executing as user@server.com: SCP did not finish ...
0
votes
3answers
4k 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 ...
0
votes
2answers
92 views

Download file using terminal to local directory

I m trying to download a file but can't seem to get it right. scp root@ipaddress:oo_db_bck_2_aug.sql /home If I try to set the path to /home/username/Desktop the username folder doesn't exist. ...
7
votes
3answers
28k views

PSCP: Upload an entire folder, Windows to Linux

I am using PSCP to upload some files from windows to linux. I can do it fine just uploading one file at a time. But I have some very large directories and I want to upload an entire dir at once. I ...
1
vote
2answers
757 views

Copying data between AWS EC2 machines

There are times where, in order to do some debugging or perhaps a manual migration, I need to copy large chunks of data from one EC2 instance to another. When the size of the data is tiny, it's simple ...
-1
votes
1answer
805 views

Why is scp with compression slower than without?

I needed to transfer a 20 GB KVM vdisk file, storing the root filesystem of a CentOS 6.5 VM, from one lab server to another. The large file size and the fact that I had once compressed such a vdisk ...
2
votes
3answers
4k 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 ...
1
vote
1answer
257 views

Download startup config from Cisco device using SCP

I can successfully download the config from Juniper network devices using SCP - I'd like to do the same for a Cisco router. SSH access is already working, and I've enabled SCP using ip scp server ...
-1
votes
1answer
184 views

heartbeat timeout error in tsunami deamon

I am trying to transfer a large file from server A to server B using tsunami. I am getting following error: Heartbeat timeout of 15 seconds reached, terminating transfer. And here are details: ...
0
votes
0answers
17 views

find user's scp history [duplicate]

I am using an Ubuntu Server over an AWS instance. To find out the scp history on server I can check the .bash_history file cat .bash_history | grep scp But, does the server maintains a log of all ...
-1
votes
3answers
2k views

SCP Asking for Password with RSA Key

I've followed a few tutorials on setting up RSA Public Key Authentication, but I cannot seem to get it to work. I can SSH into the remote machine without a password, but when I try and scp files, I ...