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.

438 questions
12
votes
5 answers

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 root@111.111.111.111:/home/somefolder/ Permission denied (publickey,gssapi-keyex,gssapi-with-mic). lost connection On serverA I created…
9
votes
3 answers

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?
3
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
  • 135
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…
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
  • 16
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
1
vote
0 answers

Scp with decreasing speed

It has happened to me for years actually I'd say. I haven't tested too many use cases but whenever I've to copy by scp a large file to another machine (usually all of them running Ubuntu Server or Desktop, from 14.04 to 18.04, within a local network…
ABu
  • 499
1
vote
2 answers

scp says: Bad configuration option: CheckIP

I try to do a scp on my centos (without having ever configured anything on the ssh_config) receiving: Bad configuration option: CheckIP Where in ssh_config CheckIP no is configured. Didn't find anything with google, whats up with that error?
Stefan
  • 113
1
vote
3 answers

Optimizing on sending files via site-to-site vpn connection

I've got a site-to-site vpn connection between two data centers (one in San Jose, the other in Toronto). I need to send a 32GB file from one dc to another - FAST AS POSSIBLE. I've found a shell script that splices up the 32GB file smaller files and…
Simon
  • 13
1
vote
1 answer

problem using scp

I issued an command on a local machine scp -r download/ tim@foo.xxx.xxx.xxx Then I checked at the remote foo.xxx.xxx.xxx and found under my home directory, there is nothing. Did scp transfer something? If yes, where are they? Thanks!
Tim
  • 1,517
0
votes
1 answer

Permission difference with scp "dir -r", "dir/*", and "dir/file.txt"

Recently I have been getting an error when trying to scp into a CentOS Linux release 7.7.1908 (3.10.0-1062.4.3.el7.x86_64). These commands work: scp dir/file.txt . scp -r dir/file.txt . But this command has stopped working: scp dir/* . The error…
0
votes
2 answers

Download file using terminal to local directory

I m trying to download a file but can't seem to get it right. scp root@ipaddress:oo_db_bck_2_aug.sql /home If I try to set the path to /home/username/Desktop the username folder doesn't exist. Just leaving a / showed activity but I can't find the…
Ciprian
  • 107
0
votes
1 answer

Loaded files of the website with scp, but css files and images are not loaded

I have copied all the files related to the website to the server using scp, but the only css file that I loaded inside css folder on the server is not loaded by the html files. I have checked the path to the stylesheet file in the html files, but…
user236846
0
votes
1 answer

scp takes more time to copy and stalls

I am using Ubuntu with a 2Mbps link. I would do scp to the Ubuntu cloud servers to copy a .war file which is 14MB. It used to take only 2 minutes to copy this .war file under /tmp of the cloud server. Now it takes more than 15 minutes. While doing…
user53864
  • 1,753
  • 11
  • 37
  • 67
0
votes
1 answer

file transfer automation

Server A generates a file and scp's it to Server B. I have cron running on Server B that each minute looks for new files that were copied over. My question is- how can Server B ensure that the file that was copied over is actually done being…
rizen
1
2