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
1 answer
72 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
31 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
60 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
28 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
  • 836
1 vote
0 answers
63 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
  • 579
0 votes
1 answer
107 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
99 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
19 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
95 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
-1 votes
1 answer
397 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
18 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
75 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
64 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,848
-1 votes
1 answer
217 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
1k 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 ...
theonlygusti's user avatar
0 votes
1 answer
97 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
233 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
487 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
  • 113
0 votes
1 answer
147 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
233 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
  • 843
0 votes
1 answer
41 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
146 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
132 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
89 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
1 answer
2k 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
87 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
193 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
0 answers
85 views

How do I use curl to copy stdin to a remote host with key-based auth?

I'd like to paste the output of a command to a file in a remote host. $ <pipeline> | curl -T - -u root --pubkey ~/.ssh/id_rsa.pub --key ~/.ssh/id_rsa scp://<host>:<port>/<path> ...
ychaouche's user avatar
  • 955
0 votes
1 answer
210 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
127 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
  • 6,122
1 vote
1 answer
292 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
822 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
  • 6,122
4 votes
1 answer
2k 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
  • 41
0 votes
1 answer
64 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
583 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
0 votes
1 answer
330 views

Change owning user and group on file creation

I have an issue where I want to connect a very old system (UNIX) to a new machine. This old machine logs in by scp using a hardcoded oldsystemaccess user and copies a file into a subdirectory of the ...
siryx's user avatar
  • 95
0 votes
0 answers
22 views

Can I safely start reading a file while it is being sent over scp?

I am copying a large sql backup to a server using scp. It takes a couple of minutes to copy. When it has finished copying, I plan to restore a database using that backup using (modulo details) mysql &...
preferred_anon's user avatar
0 votes
1 answer
265 views

How do I move (a) file(s) from Windows to headless Ubuntu Server without retaining the original copy(ies) in Windows?

question title pretty much sums it up but for more background; I set up an Ubuntu Server to host Plex on for myself and family members. Currently to add movies I will extract files from a disc or ...
Ego's user avatar
  • 3
0 votes
3 answers
132 views

How to select or find new file in directory linux

I want to use scp to backup 1 directory from server. But my problem is backup directory have so many file (old & new file) . I just want to copy new file such as . file 1 - last modify: 2022-10-11 ...
dominic.dao's user avatar
1 vote
2 answers
567 views

How to fix "unzip: Unrecognized archive format" in FreeBSD? [closed]

I try to unzip a folder that I copied to FreeBSD from another machine through SSH/SCP. However, I keep getting the error unzip: Unrecognized archive format which to me does not make sense in this case....
Anna Madsen's user avatar
1 vote
1 answer
2k views

Using SCP to copy a directory but can't access it in the location

I have been trying to copy a directory using SCP from windows to my Ubuntu server. it looks like it has completed the transfer on the windows CMD but when I use ls on the server in the location I ...
Mater's user avatar
  • 13
0 votes
1 answer
332 views

How to replace matching pattern in an array

I have array with name 'arr' which has the following value - post-ro post-ro-1 post-ro-2 I have this variable: str="su scp [email protected]:/etc/bp/pg/pri/user.json /etc/bp/pg/pri" I want to ...
Madhavi Deshpande's user avatar
0 votes
1 answer
1k views

SCP from local drive (not C:) to remote server [closed]

Trying to SCP a file on my local E: drive to remote server. I have tried the following: scp E:\Projects\new_server\ssl.conf user_id@host:/etc/httpd/conf.d/ But get: ssh: Could not resolve hostname ...
IlludiumPu36's user avatar
2 votes
1 answer
164 views

Transfer files from a second remote (Ubuntu) to my local (Windoes 10)

I use ssh in a PuTTY terminal in my laptop (Windows 10) to connect to the campus Ubuntu server and then use ssh once more to connect to my office computer (Ubuntu). I use the PuTTY terminal on my ...
EhsanYaghoubi's user avatar
1 vote
0 answers
173 views

SCP command from remote to remote keeps asking for password even when I specify the private key file

I've tried using the -i option and also adding the public key to the destination's authorized_keys file but nothing seems to be working. Does anybody know what other potential problems there may be? ...
Sean's user avatar
  • 161
0 votes
1 answer
149 views

How can I clone an entire remote directory tree and file structure but have empty files, via the command line?

On a remote production server I have a directory that has more than 15 Terabytes of data. Also, in addition to Linux permission, ACLs are heavily used to allow departments, users, and daemons fine ...
user658182's user avatar
-1 votes
1 answer
4k views

Uploading a local file to a server using mobaXterm?

I want to upload files from my local computer to a remote server SSH through MobaXterm. I keep running into different issues that simply don't allow me to do this. I'm running Debian GNU/linux 10 (...
Noideawhatimdoing's user avatar
1 vote
1 answer
293 views

Is it possible to copy a file from a remote host back to connecting host while already being connected to remote host over ssh

I'm connected to a remote host over ssh. To copy something from the remote host to my local host I can copy it using scp. However this would require typing in the complete path to the file on the ...
Tarick Welling's user avatar

1
2 3 4 5
16