Questions tagged [scp]
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.
437
questions
791
votes
9
answers
1.1m
views
Can scp copy directories recursively?
Currently I can only copy a single .tar file. But how can I copy directories recursively with scp?
101
votes
10
answers
89k
views
How do I do Multihop SCP transfers between machines?
I want to copy a file from my machine A to server C, but only have access to server C through server B.
Instead of first transferring to server B, log in and then transfer to server C, Is is possible ...
98
votes
2
answers
161k
views
scp without known_hosts check
Is there any chance to skip the known_hosts check without clearing known_hosts or disable it in ssh.conf? I neither have access to known_hosts nor ssh.conf yet.
Don't find any suitable in man.
84
votes
9
answers
108k
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:
...
79
votes
11
answers
126k
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?
72
votes
8
answers
99k
views
Quickest way to transfer 55GB of images to new server
I currently have two CentOS servers. I need to know how and what the quickest way would be to "tar" up the images directory and SCP it over?
Is that the quickest way that I just suggested, because ...
64
votes
7
answers
106k
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 ...
62
votes
6
answers
730k
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 but ...
47
votes
4
answers
149k
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 directory at once.
...
44
votes
2
answers
127k
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 ...
40
votes
4
answers
129k
views
FTP/FTPS/SFTP/SCP - Speed comparison [closed]
How do FTP, FTPS, SFTP, and SCP compare in terms of transfer rate and how can I compare them through testing?
39
votes
4
answers
142k
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 ...
38
votes
3
answers
47k
views
SCP transfer only modified files
I'm using below command to transfer files cross server
scp -rc blowfish /source/directory/* [email protected]:/destination/directory
Is there a way to transfer only files modified files just like ...
38
votes
4
answers
67k
views
Make scp always overwrite or create directory
I am using scp to copy a directory from one remote server to a new directory (IE just changing the name) on another remote server like:
scp -prq server1:dir1 server2:dir2
This works fine if dir2 ...
32
votes
3
answers
182k
views
WinSCP alternative for OS X (that supports sudo and without virtualizing WinSCP) [closed]
I recently switched from administering my systems using Windows to OS X. I've found really nice alternatives to damn near everything I used previously, however I have not found a nice GUI editor (...
29
votes
7
answers
72k
views
Is there a GUI alternative to Putty SSH for transferring files?
Or any GUI SSH for Amazon ec2 Linux instance servers?
I need to transfer files between two Linux virtual servers and currently I have PuTTY (which Amazon recommends). However I am new to the server/...
27
votes
12
answers
514k
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 work.
How do I set the hard disk from where I ...
27
votes
3
answers
99k
views
scp files and delete files on remote directory [closed]
I am a unix noob, so please be patient :-)
I have a script that scps a bunch of files to another server.
Suppose they are z1.foo, z2.foo etc. What I want to do is to scp files and delete files older ...
24
votes
10
answers
56k
views
Copy large file from one Linux server to another
I'm attempting to copy a 75 gigabyte tgz (mysql lvm snapshot) from a Linux server in our LA data center to another Linux server in our NY data center over a 10MB link.
I am getting about 20-30Kb/s ...
24
votes
5
answers
26k
views
Difference between scp and sftp
What is the difference between sftp and scp?
22
votes
6
answers
22k
views
OpenSSH anything like 'internal-sftp' but for SCP?
I'm running Debian stable and I'm looking to establish the following environment for users in my 'sftponly' group:
jailed
can transfer with SFTP
can transfer with SCP
cannot login interactively with ...
20
votes
2
answers
58k
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, ...
18
votes
2
answers
37k
views
What a pros and cons of FTP vs SSH for file transfers?
Why to consider setting up an FTP service on a server when files transfers work fine by means of SSH (with Midnight Commander on a Lunux and FileZilla on a Windows client)? What are pros and cons of ...
16
votes
6
answers
18k
views
Problems with SCP stalling during file copy over VPN
I have a series of files I need to copy via SCP over a VPN to a remote linux server each night. The files are not large, we're talking about tens of megabytes here, but the file copy almost always ...
15
votes
2
answers
15k
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 ...
14
votes
3
answers
15k
views
Redirect output of mysqldump to scp
I worked with a Linux pro years ago who did this nifty trick. He could do a mysqldump but redirect the output to an scp/ssh connection rather than writing to disk. We used this quite a bit where I ...
14
votes
3
answers
19k
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 ...
14
votes
5
answers
38k
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 ...
14
votes
4
answers
6k
views
SCP filename tab completion
I use SCP regularly to move files between servers and I've heard rumoured that you can use tab-completion on the remote server if you're using public keys, but so far I have had no luck.
What I'm ...
14
votes
2
answers
15k
views
What does limit performance of scp?
I've two Debian Linux machine connected via 1 Gbit LAN. I can measure this with a raw HTTP file transfer with wget which gets around 100MB/s in either direction.
When I now use scp, the maximum ...
14
votes
2
answers
12k
views
Up-to-date alternatives of rssh or scponly [closed]
I need:
An scp and sftp server
With chroot-ed environment
With non-login (ssh not allowed for scp/sftp users)
Options and related issues I found:
scponly
No updates since more than 6 years
Does ...
13
votes
1
answer
15k
views
SCP with password authentication only doesn't ask me for password
I'm trying to copy files from one server to another with scp.
On both servers, I configured ssh port to 222. sshd_config for both servers is exactly the same (no RootLogin, PasswordAuthentication ...
13
votes
4
answers
2k
views
Is BitTorrent good for copy files between servers in the workplace?
I have 1 source server that contains about 30GB of files that I want to copy to 7 other servers. I currently SCP the files over to the first four servers and when that transfer is complete SCP to the ...
13
votes
5
answers
78k
views
SSH / SCP Server on Windows [duplicate]
Possible Duplicate:
What is a good SSH server to use on Windows?
Can anyone on the SF community recommend a trustworthy/easy to set up SCP server for windows. I do not want to go through the ...
12
votes
5
answers
64k
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 [email protected]:/home/somefolder/
Permission denied (publickey,gssapi-keyex,...
12
votes
1
answer
10k
views
Reliable file transfer over slow or flaky network link
I need to transfer a number of files files over a low-quality broadband link to a server. The files are large, and take approximately 30 minutes to transfer per file.
I use scp, but it sometimes ...
11
votes
4
answers
27k
views
Delete files older than X days on remote server with SCP/SFTP
Do anyone know some good way to delete files on remote server that are older than X days using just SCP/SFTP?
Sure I can write some script on perl etc but I feel it's overkill.
Any UNIX way?
Oneliner?
...
10
votes
2
answers
15k
views
Linux SCP defining destination port
How can I specify a port for the destination ip? When I do scp -p 0000 it still tries to connect on port 22, not the one I'm specifying.
scp svn_backup.tgz [email protected]:/path/to/new/svn/
9
votes
2
answers
19k
views
scp only files with defined extension
I want to transfer only files with special extensions (like only *.tar.gz, *.war) in one scp command (Debian Linux). Is this possible, if yes how is the syntax?
Should be someting like:
scp 192.168....
9
votes
1
answer
12k
views
bind interface for upload : scp works, not rsync
I need to upload file on a specific interface.
This cannot be set-up via iptables, because my script output on several interfaces.
this is working fine :
scp -oBindAddress=192.168.100.1 ...
but
...
9
votes
4
answers
63k
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 ...
9
votes
3
answers
18k
views
scp - skip a file while running
I'm running scp and copying a folder from remote server, I'm running with -rl , so i see the files being copy, is it possible to skip current file some way?
8
votes
8
answers
24k
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 ...
8
votes
2
answers
4k
views
Does SCP lock the file it is transfering?
Have a situation where we have an application log sitting out on an AIX server. The log is being continually written to from the application, and we have users on Windows who want to view the file. ...
8
votes
4
answers
32k
views
Why getting a permission denied (public key) error for SCP when SSH works
I'm trying to copy a file from my local host to my Amazon EC2 instance using SCP and receiving the error:
Warning: Identity file blocks_key.pem not accessible: No such file or directory.
...
7
votes
2
answers
4k
views
MTU on server accidentally set to 0, can't ssh into it?
My server had some problem with the ssh and I couldn't upload files of size > 10 KB, as scp would hang during the copy. I found a solution for this problem here, and I was changing the MTU, when I ...
7
votes
3
answers
27k
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 ...
7
votes
4
answers
2k
views
Cisco IOS QoS prioritize SSH but not SCP
How can I prioritize ssh traffic to ensure low-latency but throttle SCP file transfers? I'm looking for a solution that is not host specific so I don't have to add lists of IP addresses. Thanks!
7
votes
5
answers
20k
views
scp inside sh-script with passphrase
I've got a sh-script for a backup
scp /mybackupdir/* backupuser@backupserver:/backup
Is there an easy way to add a passphrase to the scp? Or do I have to check if an ssh-agent is running and if not ...
7
votes
5
answers
7k
views
Skip over intermediate server via SSH
I just got hired to work in a lab with a big 'ol linux cluster. I'm a mac/windows guy, so I'm still trying to figure out how to navigate around using a 'nix command line. So far I haven't run into any ...