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
2
votes
0answers
33 views

Scp doesn't finish, even after a reboot [duplicate]

For some reason, I'm trying to transfer a simple 0KB file from one system to the next using SCP and it's just hanging at 100%. I've enabled the -vvv flags but still have no idea what this verbose ...
-1
votes
0answers
16 views

Scp fails ssh connection if running as systemd service

Starting the service below returns BackendException: ssh connection to root@192.168.123.45:22 failed: No authentication methods available cat /etc/systemd/system/backup.service [Service] User=joe ...
0
votes
0answers
28 views

Double hop scp - OpenSSH error [duplicate]

I am trying to copy a file from my local machine A to a server C through server B using scp. I have read a couple of things on this, and came up with this: scp -o ProxyCommand="ssh -J user@serverB:...
2
votes
2answers
85 views

How to allow SSH into, but not file transfer from, a Linux server?

I have a Linux server (Ubuntu 16.04) where I run some simulations. I would like to give an employee access to this server so that he can test out his code (he would be accessing it remotely, from his ...
1
vote
2answers
69 views

Use find with scp or rsync to send found files

I am trying to run a simple command that searches for a dedicated file type and once found copy's that file and directory structure to a remote server. For example: find Source/ -name *.CR2 | xargs ...
0
votes
0answers
15 views

How to send data back and forth between 2 computers which are in different networks? I can use a third computer as host

I have 2 identical Raspberry pi's (A & B) with Raspbian buster on each. My idea is to communicate between the 2: sending output of a program (not even a KB/s) via ssh (or other program, I am open ...
0
votes
0answers
38 views

scp to home through port 22

I turn on VPN from home and everything seems fine but I cannot 'scp' from cluster unless I'm at work where I don't need VPN server ssh status: ... some gibberish... Received SIGHUP; restarting. ...
52
votes
6answers
5k views

Is scp unsafe? Should it be replaced with sftp?

I have over 20 years experience in Un*x, and I have been using scp for immemorial times. scpis over SSH, therefore I consider it as secure as the latter. Now, in my company, where I recently took up a ...
0
votes
0answers
24 views

Copy between two remote servers via local server [duplicate]

I've search and tried many solutions from this page. But I wasn't able to use any of them. Here is the situation: I have linux VM (hostname = debianVM). From this VM I'm connecting to remote servers. ...
0
votes
3answers
77 views

Linux vs. Windows copy performance

I am attempting to copy files from an old NAS to a new one (I say "new", but the new one is about 8 years old, and the old one is about 12 years old). Since both have RAIDed disks, physically removing ...
0
votes
1answer
20 views

scp not working from remote to local not working

On my mac, logged in via ssh to a remote host, I am experiencing difficulty transferring files to my laptop from the remote computer in the window where I am ssh'd into the remote computer. Is this ...
0
votes
1answer
33 views

scp connection via ssh refused, but connection via ssh works

I want to copy the file from MS-windows: D:/myfolder/b.csv to virtualbox Gnu/Linux /home/tester/Downloads I can connect via ssh: ssh tester@127.0.0.1 -p 2222 but scp can't: scp D:/myfolder/b.csv ...
0
votes
0answers
38 views

scp file on iCloud Drive/Desktop to remote - OSX

I generally use the scp command to copy files between local and remote locations. I saved my current file on my Desktop but it seems to be stored in /iCloud \Drive/Desktop/file . When I try to scp ...
2
votes
2answers
197 views

scp speed limit?

I am transferring some files between two servers and I can't seem to get past 10.5MB/s (84Mbps). Neither end is being slowed due to encryption according to htop; and both internet connections are ...
0
votes
1answer
67 views

Remote SSH copy files with filenames that contain certain strings

I have two remote servers. One that I am currently connected to and one that I am trying to copy a lot of files to (10.10.0.13) I have a series of files I need to copy within various directories of ...
0
votes
2answers
68 views

Is there a utility like rsync, but with the speed of btrfs COW?

rsync has various performance issues; I have never been able to make it perform a sync in O(#changes). Even if it uses modification time and not checksums, it still needs to generate a list of all ...
0
votes
0answers
43 views

Send file from server to local computer via scp (login server already) [duplicate]

Is it possible to send a file from the server to local computer via scp (login server already) If so, how could I find the username and address that used as a hostname for my computer?
0
votes
0answers
13 views

If you're going to build a chroot jail, shouldn't you take in only the libraries that the user needs?

Say there's only a couple of commands I want a user to be able to run in a chroot jail. If I include more libraries / commands than they need in the jail, doesn't that create a security issue? And ...
0
votes
1answer
85 views

SCP error for bash script with spaces in source path

Surely I'm missing something simple, but this is driving me nuts. I'm trying to SCP a remote file to the current local directory. The remote path has spaces in it. I need this to run in a script and ...
0
votes
1answer
470 views

SCP giving “exec request failed on channel 0 lost connection”

first off, I know that this question has been asked before, but I'm very technologically illiterate and I'm unable to understand the answers (and they've all been answered a couple years at least), so ...
0
votes
1answer
172 views

Replacing scp with rsync

For a long time I've been wishing to replace scp in favor of rsync due to all the advantages and extra features of the latter (better performance, resuming interrupted downloads, displaying progress ...
6
votes
1answer
506 views

“Can't open display” when using `scp`

When I type scp file1 user@host.com:file2 into the command prompt, I get the message Can't open display Can't open display Can't open display Can't open display Can't open display file1 ...
0
votes
0answers
17 views

pam/openssh disable ssh for a user but leave scp intact?

I've set up a user. I'm using pam_chroot.so in pam so that they are chrooted to a directory. They can currently ssh and scp to that location. How can I disable ssh for that user?
0
votes
1answer
30 views

How to use user defined variable names in a linux command?

I am new to writing scripts. I need to write a script to download files from server and store it in a directory defined dynamically using linux's date-time. Here is what it looks like dir_path="/...
1
vote
2answers
127 views

scp copy multiple files from remote machine to local machine

I have the following files in a remote machine: ./aerokube/ └── selenoid ├── browsers.json ├── run.sh └── Logger.java I want to copy run.sh and browsers.json from the remote machine to ...
0
votes
2answers
51 views

Syntax to transfer from remote to local scp by leapfrogging onto another host?

I am trying to copy files from a remote server to my local server, however, my remote server first requires me to connect to an intermediate host and then leapfrog onto the actual server from there. I ...
0
votes
0answers
26 views

How to copy a remote tree without hidden files?

I have a tree with 100GB of data, and I'd like to scp it to a remote machine. A large portion of the data is in hidden .files that I'd like to keep locally, but I don't need it remotely. Is it ...
0
votes
0answers
119 views

Consecutive scp commands sometimes fail with ssh_exchange_identification: read: Connection reset by peer

Scenario I use a script to copy multiple files from an EC2 linux box (ubuntu 18.04) like so (pseudo code only) for file in FILES; do scp -i <key> ...; sleep 1; done It will copy several ...
0
votes
1answer
34 views

How to allow file xfer for users to/from a system, but not ssh, without changing their shell [duplicate]

Clunky title, but wanted to be clear that it's not the same as previous variations on this question. Here are the parameters: HPC cluster where users auth via LDAP They may use interactive logins to ...
0
votes
0answers
134 views

SCP stuck on file copying

I have a test file with a simple text inside. If filesize more then 750 bytes I can not transfer it via SCP or rsync. Internet works fine on the host and has Download: 16.53 Mbit/s Upload: 2.83 Mbit/...
0
votes
0answers
23 views

scp `ls -liart | tail -n5 | grep 0001` wuxi-jump-128:/tmp fails: No such file or directory

I hope to make scp work with pipe, like firstlove@chenli ~/Downloads $ ls -liart | tail -n5 | grep 0001 51384329 -rw-r--r-- 1 firstlove firstlove 1440 Oct 31 ...
6
votes
1answer
356 views

Bash - argument list too long

I want to to scp from a remote server to my local computer a large folder with about 115k json files. Let's say that I use something like this: scp username@remote:/remote_path/*.json /local_path/ ...
1
vote
1answer
23 views

Network file transfer not going through

Trying to transfer a file from my raspberryPi to my laptop (in the same network) via the terminal, but it takes a while and then says ssh: connect to host 192.168.1.121 port 22: Connection timed out ...
0
votes
1answer
32 views

Is there a way specify the host I am connecting from in scp or rsync when connected via ssh?

Considering I have connected via ssh to a remote host and I want to copy a file from that remote host to my local device: I know that I can just copy that file from a shell on the local device by ...
6
votes
2answers
254 views

SSHFS/SFTP : Vim hangs when trying to edit file over sshfs and can't upload file over MTU size over sftp

My university provides an ssh access to the students university accounts, and I just set up an sshfs to access some folders on my remote account. I am running pop_os on my local machine and using ...
0
votes
1answer
127 views

Permission denied error while using scp command between two remote machine

I have 3 machines in my local network. These are Machine1 : 192.168.1.1 (root user: user1) Machine2 : 192.168.1.2 (root user: user2) Machine3 : 192.168.1.3 (root user: user3) I am working on ...
-1
votes
1answer
31 views

Password prompt when copying file to remote server using scp while password authentification disabled

I have remote server where i set up authentification through ssh keys. Where i try to connect to server by ssh user@hostname server didnt prompt me password but when i am trying to copy file from ...
0
votes
1answer
220 views

Allow SCP in RHEL CentOS 7 selinux

running rhel 7.6 (or centos 7.6) With selinux = enforcing doing an ssh in to or out of the system works, but doing a scp to the RHEL selinux system does not work. On the RHEL system if I do ...
-1
votes
2answers
45 views

Command not running from inside shell script [closed]

The script: #!/bin/sh scp /conf/acme/* gentooserver:/etc/ssl/apache2/ scp /conf/acme/* octopi:/etc/ssl/ When I execute it, I get output indicating at least the first command executes. (Plus the ...
0
votes
3answers
82 views

Is there anything wrong with having separate SSH keys for different virtual machines? [closed]

Edit 2019-09-12: After everyone’s input. I’ve decided I need to research ssh key management so more. I will post outcome of research. I am running RHEL-7.7 as a host hypervisor. I am running several ...
2
votes
1answer
158 views

SCP as different user

I was wondering if it's an option to scp as different user(not the one who connects to remote server). For example, if user A has kerberos ticket to server X and user A has sudo access to user B. Is ...
0
votes
0answers
58 views

SCP to /opt, is it possible? (permissions)

I understand that a non root user can't write to /opt. I chowned /opt to root:wheel, and that also doesn't work even though the account that I am scp'ing with is in the wheel group. The only thing ...
6
votes
1answer
344 views

What is the protocol for sending files over SSH, in code?

I was reading some Go code that sends a file over an SSH client. https://github.com/tmc/scp/blob/master/scp.go#L33 One of the things it does is a scp -t /remote/path. What is that -t flag for? I did ...
4
votes
1answer
102 views

scp: using specific NIC

I am trying to achieve to perform scp via specific NIC. I read SCP man page but couldn't find required flags.
1
vote
3answers
544 views

Auto enter password for SCP

I will make scp be on cronjob so I would rather use to auto enter the password of the other server. sshpass -p 'your_password' scp user@abc.com:/usr/etc/Output/*.txt /usr/abc/ This script didn't ...
31
votes
7answers
5k views

How can I download a file from a host I can only SSH to through another host?

I want to download files from my office computer to my laptop. I can connect my office machine by SSH to the organization server and then SSH from the server to my office machine. The only commands ...
1
vote
2answers
329 views

How to use variable in scp command for multiple files

I tried to do scp multiple files. When I do ls {aaa,bbb}*_list.txt, I could see only the selective files. However, If I assign this to a variable and tried to use it in scp command it doesn't work. I ...
0
votes
0answers
30 views

How to run the shell script on remote server from a windows shell script or a bash script?

I have created a shell script to upload git files from windows to bitbucket. Now I have placed that shell script in Linux box because the source folder exists on Linux was from directly I want to ...
1
vote
1answer
336 views

How to specify port for scp for a remote server?

I have two remote nodes that I am trying to send files from one to another. scp remote1:~/testSCP remote2@10.0.1.10:~/ I have ~/ssh/config set up in my local machine so, it is using port 2222 by ...
0
votes
1answer
157 views

how to copy ssh key from client server to linux desktop using scp

I want to copy ssh key id_rsa and id_rsa.pub from client-server to Linux desktop folder. I already test it scp command for a copy from Linux server to client-server scp id_rsa.pub username@client_ip:/...

1
2 3 4 5
12