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

SCP on two remote hosts with nonstandard ports

Is there a way to use scp -3 to copy a file from one remote host to another, where both use non-standard SSH ports, without configuring each host involved in ~/.ssh/config? I've seen suggestions that -P xxxx can be used before each file argument,…
Tom
  • 327
  • 2
  • 11
2
votes
3 answers

SCP Unable to copy from server with Private Key

I'm trying to use SCP to copy a file from a remote VPS which uses private keys to a local machine. I'm getting different errors depending on what I try and I am not sure what the correct method should be. Here is what I have tried: scp -i…
Edward144
  • 153
  • 2
  • 2
  • 5
2
votes
1 answer

Using google drive to dynamically expand VPS storage

I was wondering if anyone ever tried using the free online storage services such as Mega, Google Drive or Dropbox to dynamically increase the "small" storage provided with cheap VPS services. What I mean by "dynamically" is that whenever I upload…
R3D34THR4Y
  • 23
  • 3
2
votes
1 answer

Download public & private keys from Google Cloud Instance

New to the cloud so pardon this question as I'm certain it's relatively simple! I've setup my Google Cloud Instance and I'm now trying to connect to it using FileZilla. I have a good understanding of how to do this... but I've been completely unable…
2
votes
2 answers

SCP from one external server to another

I am trying to a SCP on my local server that copies a file from one remote server to another remote server (Both remote servers use a custom port (xxxx) I am trying: scp -r -P xxxx root@xxx.xxx.xxx.111:/home/myimages/images.tar.gz…
icelizard
  • 732
  • 3
  • 10
  • 20
2
votes
5 answers

How to copy /etc/hosts to all my machines?

import os, sys, time servers = ['dev','admin','db1'] for s in servers: cmd = 'scp /etc/hosts regular_user@%s:/etc/hosts' % s print cmd os.system(cmd) I have written this script to copy my current HOSTS file to all my other…
Alex
  • 8,471
  • 26
  • 75
  • 99
2
votes
1 answer

SFTP/SCP when ultimate destination is a mapped fileshare. Is it secure for the entire end to end transfer?

I'm trying to securely transfer data from Solaris (version 10) to a Windows fileshare so the business users can access it. The fileshare is mapped as a drive letter in an intermediary Windows Server (Win2003) that has openSSH running as a…
2
votes
1 answer

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 user@remote:/dir2/ (which contains an inc folder) Is…
Fabrizio Mazzoni
  • 671
  • 1
  • 9
  • 24
2
votes
1 answer

SCP command hangs while transferring small files

I have a new server in a private subnet in an AWS VPC. I have a NAT instance in the public subnet of my VPC, and can connect out to remote servers fine. However, when I try to scp files, things seem to hang. ryan@sever-in-vpc:~ $ scp -vvvv myfile…
Ryan Olson
  • 171
  • 2
  • 6
2
votes
5 answers

Automate and create SSH keys for large number(Nearly 9000) of servers for almost 30 users

Is there a way to automate to create SSH keys for large number(Nearly 9000) of servers for almost 30 users
Gokul
  • 41
  • 4
2
votes
2 answers

copy between remote server with local authentication

When I need to copy some files between two remote servers, I usually scp -3 user@server1:path user@server2:path unfortunately, since that routes traffic through my machine, that is very slow when the files are "big" and the servers "near" one…
giorgiga
  • 225
  • 1
  • 2
  • 6
2
votes
1 answer

freeSSHd SCP Linux to Windows Fails with "exec request failed on channel 0"

Windows has freeSSHd installed. Logging in with ssh from Ubuntu 14.04 LTS via SSH using Windows Login credentials works fine. Logging in with SFTP also works fine. This test is being run from a virtual machine in VirtualBox to the host running…
Jim
  • 173
  • 1
  • 9
2
votes
2 answers

Give user SCP access to another user's home directory

We normally use public key logins for our server but a new subscription service is requiring a username and password for SCP access to a user's account (This is Vaultpress - A remote backup utility for Wordpress). We have a blog running under UserA…
Kevin
  • 827
  • 3
  • 13
  • 23
2
votes
3 answers

scp stuck when trying to copy files from Linux to windows

I use the following scp syntax in order to transfer allot of files from Linux red-hat 5 to windows machine ( under Temp directory ), Remarks: SSH server already installed on windows machine I use this line in my shell scripts sshpass -p…
Eytan
  • 611
  • 6
  • 13
  • 27
2
votes
8 answers

Secure file transfer in linux without SSH?

I want to transfer files between to machines over the internet, in a SECURE way. Both machines have linux (the "server" uses Ubuntu 12 and the "client" uses Mint 14). I DO NOT want to allow ssh to my server, and i want the client to be able to open…
guipy
  • 37
  • 1
  • 1
  • 4