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.

The SCP protocol is a network protocol, based on the BSD RCP protocol, which supports file transfers between hosts on a network. SCP uses Secure Shell (SSH) for data transfer and utilizes the same mechanisms for authentication, thereby ensuring the authenticity and confidentiality of the data in transit. A client can send (upload) files to a server, optionally including their basic attributes (permissions, timestamps). Clients can also request files or directories from a server (download). SCP runs over TCP port 22 by default. Like RCP, there is no RFC that defines the specifics of the protocol.

Source: wikipedia

As per documentation of the most widespread implementation OpenSSH, the protocol is considered "outdated, inflexible and not readily fixed". Using more modern protocols like sftp and rsync for file transfer is recommended.

432 questions
7
votes
1 answer

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: debug2: channel 0: window 1966080 sent adjust…
fqxp
  • 411
  • 4
  • 7
7
votes
2 answers

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 tried posting this under that as an answer for…
Atomo
  • 69
  • 1
  • 3
7
votes
3 answers

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 just one file at faster than 1.3MB/s and get closer…
htfree
  • 483
  • 4
  • 9
  • 21
7
votes
2 answers

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 accidentally did sudo ip link set eth0 mtu 0. No one…
7
votes
5 answers

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 start one and add the key?
Stephan Weinhold
  • 177
  • 1
  • 1
  • 6
7
votes
4 answers

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!
ensnare
  • 2,212
  • 7
  • 24
  • 40
6
votes
1 answer

SCP Changing text file contents

I am trying to copy a file from machine A: apt policy openssh-client openssh-client: Installiert: 1:7.2p2-4ubuntu2.4 to machine B: apt-cache policy openssh-client openssh-client: Installiert: 1:5.5p1-6+squeeze5 On A: scp myfile…
mzhaase
  • 3,798
  • 2
  • 20
  • 32
6
votes
2 answers

Passing a private key to scp from the command line instead of a file

Is there a way to pass the contents of a private key directly to the scp command instead of having to copy it to a file and pointing at it via the -i /path/to/key.pem option? So instead of doing: scp -i key.pem source target Can I do something like…
Julian
  • 545
  • 3
  • 6
  • 16
6
votes
3 answers

How to parallelize the scp command?

I need to scp the files from machineB and machineC to machineA. I am running my below shell script from machineA. I have setup the ssh keys properly. If the files are not there in machineB, then it should be there in machineC. I need to move all the…
arsenal
  • 217
  • 1
  • 4
  • 11
6
votes
1 answer

Vim SCP parameter with private public key pair

Currently, I am trying to edit a file on a remote server using Vim's built-in netrw plugin. I can SSH fine into my Amazon EC2 server using a command like this: ssh -i bitname@ However, I'd like to be able to use my own Vim…
Delos Chang
  • 163
  • 1
  • 4
6
votes
3 answers

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 than dealing with the SSH Key issue, so I…
YANewb
  • 61
  • 1
  • 1
  • 4
6
votes
7 answers

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 I'm not interested in. I want to do something…
SDGuero
  • 228
  • 1
  • 2
  • 4
6
votes
5 answers

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 actual problems, but I have encountered about…
tel
  • 163
  • 1
  • 4
5
votes
3 answers

Permission denied when using scp, but able to ssh

I'm trying to copy a file from my local desktop to a remote server. Yes - the remote directory I want to copy to is set to chmod 777 Yes - the server is password protected, and I am sure I have the right password because I am able to ssh onto the…
Jillian Hoenig
  • 153
  • 1
  • 5
5
votes
3 answers

SCP hangs before File Transfer begins

I am trying to move a file from a virtual machine (Ubuntu 18.04) on my local system to a remote server using a very basic scp command. This issue is present only on one particular server, others work fine so it is not a generic thing. scp
ArunMKumar
  • 181
  • 2
  • 2
  • 9