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
1 answer

PSDH and SCP to transfer files

How can I use PDSH and SCP to transfer file to my servers (over 200 of them coming from a text file - ips) Also how can I automate this? Have people written scripts for this? Examples?
Quintin Par
  • 4,373
  • 11
  • 49
  • 72
2
votes
2 answers

PuTTY pscp directory listing - can you specify a different file date/time format?

I'm using pscp.exe from PuTTY with the -ls option to get a directory listing via STDOUT to a perl script. The output I get is this: Listing directory /path/to/my/directory drwxr-sr-x 2 234 11 4096 Feb 4 11:11 . drwxrwxrwx 21…
BG100
  • 169
  • 1
  • 14
2
votes
2 answers

scp user1@host1:somefile user2@host2:somefile

When I attempt to perform a scp user1@host1:somfile user2@host2:somfile I get Host key verification failed. lost connection The authentication to both hosts is ssh-key based, however for security reasons the private key is only stored on the host…
garbeam
  • 125
  • 3
2
votes
2 answers

How can I SCP entire directory but exclude a directory?

I want to SCP an entire directory over to my new server, but exclude the thumbs/ directory inside /storage. i want to scp over (and everything inside it, and all directories): /storage but exclude: /storage/thumbs thank you
Andrew Fashion
  • 1,655
  • 7
  • 22
  • 26
2
votes
2 answers

Can Non-login accounts in Linux make scp connections?

We have some generic Ids for working on the Linux boxes. Recently we decided that the generic account will be locked out for logins and people will get individual IDs (which is always the best choice, so far auditing is concerned). The issue is, I…
Ankur
2
votes
3 answers

Error while using scp

I use "scp" command in my shell script. How do I get the error log , if that command is not working. This is how I am using it scp file username@servername:/specificdirectory/
yogsma
  • 245
  • 1
  • 3
  • 12
2
votes
5 answers

SCP command with spaces and a comma

been having problems all day with this single scp command. Been searching and asking people etc etc. $ scp -P portNumber /ReferenceFiles/CompanyA,The/Some\ DirectoryWithA\ Space/Game user@server:/ReferenceFiles/CompanyA/Game I tried to do a file…
Relequestual
  • 247
  • 3
  • 14
2
votes
2 answers

what are the minimal user permissions required to scp files to a remote server?

I want to setup a cron job to transfer data from one host (A) to another (B). My understanding so far is that I will have to create a user on machine B, so that scp can copy the files to a folder in the users home directory. However, I do not want…
user35402
  • 1,171
  • 3
  • 10
  • 18
2
votes
2 answers

scp stalls and ssh sessions freeze up (but eventually start again)

I am running ubuntu on various computers on a home wireless network. Some are on 9.04x64, some 10.04x64 and one 9.04x32. Running scp with a large file starts out at 2.1 mbps and drops down to about 200k, stalling and dropping until the transfer is…
coleifer
  • 131
  • 3
2
votes
5 answers

Can I make scp prompt me for a username and password?

I'm calling scp from a script and want it to prompt the user running the script for their password. How do I do that?
twk
  • 125
  • 1
  • 1
  • 6
2
votes
4 answers

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 host. fdisk -l shows the device as /dev/mpx.... but…
JMS77
  • 1,275
  • 5
  • 27
  • 45
2
votes
3 answers

What is correct of SCP command on Ubuntu Hardy

If the use the following scp command then I get an error: scp -P 22 username@xxx.xxx.xxx.xxx: /home/username/public_html/* ./ The error I get is: stdin: is not a tty scp: .: not a regular file What am I doing wrong? Thanks for help.
April
  • 315
  • 7
  • 15
2
votes
2 answers

scponly worked but didn't chroot the home folder, the user can still browse the entire server

So I followed the "Chroot and Debian" tutorial in http://sublimation.org/scponly/wiki/index.php/FAQ Then when I log into user "upload" via ssh I have no access to the command line (this is what I wanted). But then when I SFTP into the upload user I…
Mint
  • 476
  • 2
  • 9
  • 23
2
votes
1 answer

SCP requires user to have home directory?

I was doing this: scp aaa.txt $user@$server:~/my-folder/aaa.txt and it works. I need something more "common" so i decided to create a specific user and to use a folder in the root path. scp aaa.txt devuser@$server:/folder/aaa.txt I receive this…
Alex 75
  • 133
  • 7
2
votes
2 answers

Using scp to copy multiple local directories to a server?

I'm trying to copy multiple directories with one command. It's kind of a mess since there are spaces in the paths, but I can't quite get it to work. Imagine a structure like this: /path/to/some directory1/ /path/to/some directory2/ /path/to/some…
jrronimo
  • 23
  • 3