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
3
votes
3 answers

Rsync-like file transfer with no rsyncd or sshd on remote end

I need to transfer and then update a directory structure from a linux host in my network to another linux host in a customer network. My only access to the customer network is through a Citrix client. I can login through SSH and I can copy files…
Russ Weeks
  • 133
  • 2
3
votes
3 answers

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 version There is a Samba share on the server, which I…
Liam
  • 1,401
  • 3
  • 19
  • 28
3
votes
1 answer

Retain agent-forwarding in sudo

I want to be able to connect to a server, start a sudo shell, then use agent forwarding to connect to another server (in order to use SCP to copy files to a protected area). But: ubuntu@tunnelator:/var/www$ ssh -p 10022 stevebennett@localhost Last…
Steve Bennett
  • 5,750
  • 12
  • 47
  • 59
3
votes
1 answer

Is it possible to force SFTP rather than allow SCP fallback ?

I have a Red Hat 5.4 server with openssh OpenSSH_4.3p2 and have been trying to setup scp/sftp logs in my server, but I am running into some problems. I followed the directions in this other post. These work great if the users choose to transfer…
mmgm
  • 133
  • 5
3
votes
2 answers

scp to remote servers stalls, unable to isolate cause

When I copy a large file (100+mb) to a remote server using scp it slows down from 2.7 mb/s to 100 kb/s and downward and then stalls. The problem is that I can't seem to isolate the problem. I've tried 2 different remote servers, using 2 local…
Rolf
  • 31
  • 1
  • 1
  • 2
3
votes
1 answer

configuration transfer over scp on commit not working on Juniper EX-2200 switch

I am making a series of configuration changes on Junos EX- 2200 switch.I have this router connected to another PC via an ethernet cable.The IP address of the switch is 192.168.1.1.I am able to ping from 192.168.1.1 to 192.168.1.0 and…
liv2hak
  • 303
  • 4
  • 13
  • 25
3
votes
3 answers

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 localfile root@:/var/www/fileremote. But this gives me an error: Please login as the user "ubuntu" rather than the user…
kalaracey
  • 197
  • 2
  • 6
3
votes
3 answers

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 is with the following: for i in *; do scp "${i}"…
Eldelshell
  • 139
  • 6
3
votes
4 answers

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. From server A you can use agent forwarding to…
Apreche
  • 1,405
  • 5
  • 17
  • 20
3
votes
4 answers

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 server copies the new .mobi file back to the…
Ian
  • 1,498
  • 4
  • 26
  • 32
3
votes
5 answers

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 xxx.xxx.xxx.xxx:/root/.ssh/authorized_keys2 What am I doing…
Maca
  • 1,043
  • 2
  • 19
  • 30
3
votes
6 answers

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. However, this JumpBox server is very small and does…
wrangler
  • 3,080
  • 5
  • 24
  • 20
3
votes
2 answers

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
myahya
  • 151
  • 1
  • 4
3
votes
2 answers

Problem copying/downloading Virtual Machines from ESXi 3.5 server

I have a ESXi 3.5 server that has 3 virtual machines on there that I cannot copy/download the virtual machine OR vmdk files from. I have tried the following options with their results: NOTE: all virtual machines shut down with no locks 1) Under…
pghtech
  • 131
  • 1
  • 3
3
votes
2 answers

SCP - Is a checksum required?

I'm backing up and transferring files automatically each night via scp. I realize I get packet-level checksums via the protocol itself, but I'm wondering what the best practice is to ensure that a transfer hasn't failed, or partially completed…
Scott Klarenbach
  • 569
  • 2
  • 8
  • 20