Skip to main content

Questions tagged [scp]

Secure Copy or SCP is a means of securely transferring computer files between a local and a remote host or between two remote hosts.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
22 views

wondering on performance issue with scp over WAN

I'm using a scp to retrive log files from linux machine. On the way between the PC and the linux machine there is WAN simulator which can be configured to some latency and delay. Setting the latency ...
user1977050's user avatar
1 vote
1 answer
77 views

scp from remote Linux server to local windows 11 machine returning "no such file or directory"

So I'm trying to download some data from a remote linux server onto my (unfortunately) windows 11 machine using the scp command in windows powershell. While I can send data to the server just fine, ...
Ataaamic's user avatar
0 votes
2 answers
82 views

SCP from A to C via B without making intermediate copy at B [duplicate]

I haven't seen this issue before, and I have been struggling for days, so I would be so grateful for some help. I have a tar on my Desktop (Desktop) that I am trying to copy to a remote server using ...
user286564's user avatar
0 votes
1 answer
82 views

"Connection refused lost connection" error while using scp command

I tried to transfer a file from an HPC system to a remote CentOS system using the following command line: scp /ANKAN/data/abc.pdf [email protected]:/data/ANKAN But I am getting the following ...
Ankan Sarkar's user avatar
2 votes
0 answers
46 views

SCP launches the SSH sub process with "-oPermitLocalCommand=no" - how to change this?

I have in my SSH ~/.ssh/config the following configuration: Host * # note: this needs in /etc/ssh/ssh_config: PermitLocalCommand yes # LocalCommand gpgconf --reload scdaemon The ...
Matthias Apitz's user avatar
0 votes
1 answer
44 views

Wrong scp destination path

I'm copying a website from remote server to another and I have SOURCE SERVER /var/www/vhosts/namesiteA.com /FolderA /FolderB DESTINATION SERVER /var/www/vhosts/namesiteB.com After ...
RobertIT's user avatar
1 vote
1 answer
71 views

scp copies folder but not contents of the folder

I have been trying to get this to work for a few days now, but I can't figure it out. I am trying to scp a folder full of .tar files from my Ubuntu-Server Server to my Windows Desktop. I want to push ...
Tim_Schmock's user avatar
0 votes
1 answer
50 views

How to use the scp command on two different servers without a password prompt?

I am trying to transfer files from one server to another using the scp command without having to enter a password. To this end I generated key files and copied them to each server's .ssh folder; but ...
Jay's user avatar
  • 1
0 votes
0 answers
82 views

How can I save the output of tail to my clipboard or somewhere on a SSH session where there is only a unidirectional connection and server is limited?

I have to report some logs from some of the servers in our infrastructure which I have limited permissions on. Every time I copy 1000 lines of logs and paste it into Slack, I can't do scp from the ...
Ilgar's user avatar
  • 3
0 votes
0 answers
124 views

SSH from OpenSSH 9 to OpenSSH 5 protocol 2 fails: “illegal argument”

I'm trying to connect from a VMware ESXi 8 machine to a VMware ESXi 5 machine to transfer all the virtual machines.  The problem is that ssh doesn't connect.  The old machine has OpenSSH 5 and the new ...
Miguel's user avatar
  • 109
-1 votes
1 answer
46 views

BASH SCRIPT: Echo to file is transfered to remote host [closed]

I am writing a bash script in order to perform some automatic backups to a remote storage server. The batch script will be run with cron jobs however I'm testing it before. See script below: #!/bin/...
Frangu Mădălin's user avatar
0 votes
0 answers
64 views

Download a file via SSh to local machine

I am using Linux Mint 21.2 and I have set up a remote server. I can upload files to it via SSH by using scp local/path/file.txt [email protected]:/destinationfolder. I am told that I can do it ...
Lereu's user avatar
  • 133
1 vote
1 answer
165 views

How can I allow scp to a user whose login shell is a restricted shell via rbash

Hi I have a login shell via /bin/rbash However i cannot scp to the home directory. Is there anyway to solve this? scp /tmp/x user@ip:/home/ubuntu/x how to make above work when user always gets a ...
Uise's user avatar
  • 11
0 votes
1 answer
36 views

How to syncronize credentials in a small laboratory? (very slim alternative to ldap)

We run a small lab with 20 Linux systems (RaspberryPI, NAS, Desktop PCs) for research with 4 scientists who all need sudo permissions. We trust all 4 users as they have sudo permission and physical ...
Jonas Stein's user avatar
  • 4,138
-1 votes
1 answer
282 views

Why can't I scp a file to this host while I can ssh to it?

I configured sshd on my remote host with /etc/ssh/sshd_config.d/custom.conf: AddressFamily inet6 PermitRootLogin yes PubkeyAuthentication no Match Address fe80::d075:6982:4410:e071 This is a fresh ...
John Smith's user avatar
0 votes
1 answer
47 views

Copy all files with the directory structure since the last run on remote server

I would like to scan for my /tmp/ directory now and then and check what files have been changed since I last time did it. All files that have been changed should be copied to remote server (as a ...
user avatar
0 votes
2 answers
92 views

SCP : copy the directory but only with specific files

I am trying to copy the directory but only with the specific files. sudo scp -r user@ip:'ls /nas1/logs/tomcat/dev-main/dev-main*|grep localhost_access_log.2023-09-21.txt' /home/test If the files are ...
Juyeon's user avatar
  • 1
0 votes
1 answer
107 views

SCP: Unable to transfer between two (remote) hosts

One is using passphrase auth, the other is not. # scp -i ~user/.ssh/id_rsa_test01 user@test01:/tmp root@test02:/path/to/test01_bkp/ ssh: Could not resolve hostname test02: Name or service not known ...
Marki's user avatar
  • 855
1 vote
0 answers
335 views

subsystem request failed on channel 0

When I tried to copy files from linux server using scp like this: > scp [email protected]:/volume1/DownloadStationStore/containerd-1.6.12-linux-amd64.tar.gz . subsystem request failed on channel 0 ...
Dolphin's user avatar
  • 639
0 votes
1 answer
279 views

How to compress multiple files quickly using tar

I need to transfer multiple files to a HPC cluster. Currently, I've been using the scp command but it takes about 10 minutes or more to transfer one file (about 1.4GB each). I've seen that using tar ...
Shayma 's user avatar
0 votes
0 answers
323 views

scp -O (legacy protocol) option per config file?

I basically have the same problem as described (and solved) over at SO. This is: scp to some hosts which do not support SFTP subsystem is only working if I provide the -O flag. However is there a way ...
Heiko Finzel's user avatar
0 votes
1 answer
24 views

How I can autodetect remote home folder when scp?

I am making an automation script and I want to scp a file from user's home folder to my pc. scp user@host:/home/user/file.txt ./ In my case I expect the file to always be in user's home folder ...
Dimitrios Desyllas's user avatar
-1 votes
2 answers
209 views

Copy file from Server A to Server B

I have requirement to copy files from Server A to Server B And then move the copied files Server A to Archive folder I have written the script, but it takes the directory name differently. Copying ...
user3792741's user avatar
0 votes
2 answers
2k views

SCP copy remote to local returns "Read-only file system" error on remote folder

I used the following command: scp -r root@IP:/home/user/remotefolder /localfolder After entering my passphrase (I'm using SSH key), I get the following error: /remotefolder: Read-only file system ...
Limerick's user avatar
0 votes
1 answer
32 views

I try to copy a file from a GCP instance to my local machine, but powershell gives me a "Permission denied: (publickey)"

I created a GCP instance, and I created a private and public key on kali linux, I saved this key in the metadata of GCP, so I can access the instance through my kali machine. Then, I need to copy a ...
Christian Ramírez's user avatar
0 votes
1 answer
230 views

using scp copy file from current directory to remote machine's corresponding location without defining that full path

is there way to copy file or folder to remote machine with the same address as current directory where I'm running scp from defining only file's name, eg: [user@machine current_location]$scp ./...
bafly's user avatar
  • 3
0 votes
2 answers
91 views

Copy gitignored files from host A to host B (rsync?)

I have a git repo where several files containing sensitive info are gitignored. These files are located in various subdirectories at various depths. Host A has all these files in place. I've cloned ...
ivan's user avatar
  • 1,888
-1 votes
1 answer
592 views

Why is rsync/scp slow from one server but fast from another?

I have 300 GB of large files located in server A. I am at home trying to copy those files, and both scp and rsync are painfully slow (80 KB/s or less). I also have access to another server B. I can ...
Daniel Duque's user avatar
6 votes
2 answers
2k views

scp many files without reentering password, all different paths [duplicate]

How can I achieve the result of many of scp ~/here/is/one me@remote:~/where/it/goes scp ~/yet/another me@remote:~/the/second/place scp ~/the/number/three/one me@remote:~/foo/bar/qux with only ...
minseong's user avatar
  • 837
0 votes
1 answer
177 views

How to use scp to copy to VM?

My mininet virtual box hostname mininet-vm ip a shows inet 10.0.2.15/24 From my client, transferring to the remote VM: scp 6jan.txt [email protected] I can not see any transferred files. Why?
MikiBelavista's user avatar
1 vote
1 answer
407 views

How to : use scp to append public key from linux(client) to windows (server with openssh running) in c:\ProgramData\ssh\administrators_authorized_keys

I am trying to copy a client key from Linux(Ubuntu) to Windows server as an administrator user. so far i am able to achieve this by using following steps: I am using bash in linux and powershell 7.3....
ZilchBloke's user avatar
1 vote
0 answers
887 views

Multihop ssh works but scp closes with "Connection Closed"

I am trying to transfer a file from my local machine to a remote machine through an intermediate hop. localmachine -> hop_server -> destination_server As suggested by https://serverfault.com/a/...
2cents's user avatar
  • 123
0 votes
1 answer
454 views

Does a cancelled scp transfer overwrite files with the same names?

In the remote directory I have a file 'checkpoint.tar', I also ended up transferring a file with the same name 'checkpoint.tar' from my home directory to the remote directory via scp. I then cancelled ...
Somni's user avatar
  • 3
1 vote
1 answer
563 views

How to let user can only read files?

I have some new files to release every day. My coworker needs to sftp/scp to my Linux server to copy these files. I don't want him to do any file delete/move/execution...etc, the only thing he can do ...
Mark K's user avatar
  • 905
0 votes
1 answer
61 views

SCP from a distant server with a cumulative size limit

I want to copy a number of files from a distant server to local computer, such that the total size of the files does not exceed certain limit, as I do not locally have enough disk space; and the files ...
Radek Vavřička's user avatar
1 vote
1 answer
296 views

Transferring very large dataset from cluster to a storage server

We have to move a set of very large data (in petabytes) from HPC cluster to a storage server. We have a high capacity communication link between the devices. However, the bottleneck seems to be a fast ...
Ikram Ullah's user avatar
0 votes
0 answers
219 views

SCP file from A via B to localhost

I have a file on a server I would like to copy to my localhost. I can access the file from my localhost via: ssh richard@B -t ssh richard@A then richard@A$ sudo bash (with password) then here is the ...
Richard's user avatar
  • 101
0 votes
0 answers
39 views

Piping not working as expected with SCP [duplicate]

I am trying to pass the password to scp command so that it doeskin prompt for it. I am doing it like this. echo "pwd" | scp -r $files_path $user@$server:$target On one server it is working ...
user564428's user avatar
0 votes
0 answers
132 views

SSH server allows login but refuses connection when trying to copy a file

I am able to log into my ssh server both using a password and also with key. But when I try to copy a local file to the ssh server (rsync or scp) it refuses the connection which is very strange. So ...
Martin Zeltin's user avatar
1 vote
2 answers
4k views

Cannot scp folders from user computer to server

For some reason I can no longer scp folders from my desktop Mac to our Linux server. Here's the error: (base) my_computer:~ username$ scp -r /source_directory/filename user@server:/home/user/...
user90664's user avatar
0 votes
0 answers
141 views

Why does transfer of a TAR file slow down so significantly mid-transfer?

I'm trying to transfer a 30GB TAR file between two servers. My problem is transfer starts at a fast rate of roughly 10s MB/s, but after 11% of the file transfer the speed slows enormously to 100s KB/s....
wziard's user avatar
  • 1
0 votes
0 answers
305 views

Copy folder from one Linux server to another - cloning files onto a backup server

I would like to copy selected data files/folders from our a production server to a backup server. I want to do this every night at midnight. The servers are basically side-by-side, on the same ...
RDK's user avatar
  • 23
0 votes
1 answer
355 views

scp doesn't work when I use sshpass with password

I am trying to transfer files between my file server and raspberry pi, I can't figure out why this doesn't work When I run this in the terminal it works: scp "/home/testfile.txt" [email protected]....
tommyokie's user avatar
3 votes
0 answers
191 views

NFS copy 100 MB/sec and SCP at 112 MB/sec?

if I do a scp over a wired 1gbps network I consistently get 112 MB/sec after getting NFS set up as best I think I can, a 548gb tar file copied in 5456 seconds = 100 MB/sec the NFS copy was calculated ...
ron's user avatar
  • 7,264
1 vote
1 answer
537 views

SCP not working with RegEx

I've been trying to copy some remote files to localhost using regex expression, but it reads the regex as if it would be a regular string and does not find any files matching that. Any ideas why? file-...
Florin200217's user avatar
2 votes
1 answer
2k views

why is NFS copy speed half that of SSH scp?

RHEL 7.9 x86-64 high end dell servers with Xeon cpu's, 512gb ram, intel nic card I am the only user on the server(s), and there is no other work load on them cisco 1gbps wired LAN data.tar is ~ 50 gb /...
ron's user avatar
  • 7,264
5 votes
1 answer
4k views

scp requires directory of same name to exist on target server

I'm using scp to upload a directory to a remote server. However, if the remote server does not have a "target" directory of the same name, I get a "No such file" error. Note that ...
Elias's user avatar
  • 51
0 votes
1 answer
78 views

Stucked while testing for a file transfer speed of 10 TB of file from server1 to server 2

I'm doing a testing of transferring 10 TB of files from one server to other server via AWS. I have mounted the file system: lsblk file -s /dev/sdb mkfs -t xfs /dev/sdb mkdir /data mount /dev/sdb /data ...
user123 codebit's user avatar
0 votes
0 answers
637 views

ssh: connect to host port 22: Connection refused

I am on Mac OS and trying to send a directory to a fedora linux laptop, using the command sudo scp -r send_folder user@ip:/, but I get the error: ssh: connect to host 192.168.1.107 port 22: Connection ...
CJ-Programmer's user avatar
0 votes
0 answers
32 views

scp returns No such file or directory in script but executes when run manually [duplicate]

For context, I need to use a custom command to build an identity file so I can ssh successfully. I've renamed it because it's an internal tool and want to avoid NDA issues. You can consider it as a ...
HappyCoder's user avatar

1
2 3 4 5
16