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.

150 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
1 answer
4k views

SCP between two different servers with two different ports

The thing is, you can specify a port to SCP, and you can transfer stuff from a remote host to another. If both hosts use different ports on SSH (i.e. 2203 and 2541), how can I specify these ports to ...
Kyngo's user avatar
  • 61
4 votes
0 answers
194 views

A strange output in welcome message

Days ago I found I cannot connect my server via sftp. Then I found that there is a dot in the welcome message when I login via ssh. .Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-72-generic x86_64)...
Xingrui's user avatar
  • 41
4 votes
0 answers
589 views

scp using a different shell?

I have a server where the default shell is tcsh. It has been setup in its .cshrc to load a number of modules on login. So it is quite slow to login and I just have to live with it. My problem is that ...
Vivek V K's user avatar
  • 141
4 votes
0 answers
811 views

two piped commands, each needs to read password from stdin

Is there a way to sensibly do this: scp user@host:/path/to/file /dev/tty | openssl [options] | less without creating a file, and without having to supply either password directly in arguments? The ...
kyrill's user avatar
  • 154
3 votes
0 answers
131 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,142
3 votes
0 answers
7k views

How to copy files from NFS share without using mount

I want to copy files from a server that has an NFS share to my machine without mounting it on my machine. I want to put this in a script everyone else can use, and mounting requires root permissions ...
gil_bz's user avatar
  • 131
3 votes
0 answers
949 views

How to pass options to ssh proxy command?

To collect some data from a bunch of hosts I use a bash script which calls scp in a loop. Most of these hosts are configured for ssh public key authentication. I may skip those which have no key ...
CrimsonPermanentAssurer's user avatar
2 votes
0 answers
76 views

Fastes way to transfer multiple (~ 2GB+ each) files from remote Linux server

I need to constantly copy multiple large binary files from a remote Linux server. These files are all approximately 2 GB+ each, and there are usually 5-15 files I am interested in transferring at a ...
user17004502's user avatar
2 votes
2 answers
567 views

How can I copy files from remote to local with a specific active group?

It's a question on copying in Linux in general and not just Singularity. I'm trying to recursively copy from remote directory to local directory. In my definition file I have: scp -r $USER@$...
vesii's user avatar
  • 193
2 votes
0 answers
1k views

Remote file transfer (rsync, scp, sftp) times out

I am running into a problem where my connection times out when I try to transfer a file remotely from a MAC OS (11.2.3) to Ubuntu 18.04.05. I am able to connect and have write access to files via ssh. ...
m.evans's user avatar
  • 121
2 votes
1 answer
2k views

Need to prefer file ownership while uploading through scp

I have been tring to upload a file through a normal user to the Amazon Gnu/Linux server, but file owner is not preferring after a successful upload. File ownership is taken from the directory, not ...
Surya SG's user avatar
2 votes
0 answers
1k views

scp : -l option (bandwidth limiting) doesn't work when scp-ing from a remote server to another remote server

If I do : $ scp -l 1024 remote1:/path/to/file remote2:/path/to/destination I can see, using nload on remote1, that the bandwidth used by scp isn't limited to 1024 kbits/s like I thought. I found a ...
ChennyStar's user avatar
  • 1,497
2 votes
0 answers
142 views

dyld library not loaded

I'm having an error while trying to secure copy a file from a Beaglebone connected to my laptop. scp filename username@IP:/Users/username/Desktop/ The authenticity of host '192.168.7.1 (192.168.7.1)' ...
Sayanee's user avatar
  • 171
2 votes
0 answers
555 views

SCP remote to local fails

All of a sudden my ability to scp from remote servers to my local machine (a Mac) are failing. I don't know when exactly this began, but something must have changed that I'm not aware of as it was ...
Joe Healey's user avatar
2 votes
0 answers
619 views

scp and rsync not working when executed within .sh files from "startup programs window"

With Ubuntu Mate 16.04, I have a file my_backup.sh like this: # Log just for trying echo $(date) >> /home/albert/dia_hora # BBDD NOW=$(date --date="yesterday" +"%d") FILE="...
Albert Català's user avatar
2 votes
0 answers
343 views

Prevent scp and less commands reading interactive tcsh script

I'm using tsch through PuTTY, and let's start by this: please don't try to convince me to migrate to another shell...:) It's being a long time that commands like scp and less didn't work well for me. ...
Bak Itzik's user avatar
2 votes
1 answer
305 views

.bashrc custom secondary password and SCP is not working, (SSH secondary password)

For "some purpose" I have added a script in the ~/.bashrc to prompt for a secondary password and its serves my purpose. But, there is only one small issue is there. When I scp to the server, It fails ...
Mani's user avatar
  • 554
2 votes
2 answers
2k views

how to get Cisco IOS public key for automatic scp connection

I want to backup the running-config of all switches per SCP to a server. Question 1: is this possible with kron? Is there a better way and why? Question 2: how can I get the public key of the switch ...
Ueli's user avatar
  • 121
2 votes
0 answers
212 views

Vim - Cursorline turns on after saving a remote file

Using vim scp://.... I open a remote file. cursorline is not shown until I save the file(:w). When I type :w and enter password, cursorline appears.If I type :set nocursorline it disappears but again ...
hknik's user avatar
  • 2,334
1 vote
0 answers
79 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
  • 599
1 vote
0 answers
504 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
1 vote
1 answer
300 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
1 vote
0 answers
177 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
1 vote
0 answers
707 views

scp with jump host two keys and user change on jump host

I have a a ssh jump server and there I have to do sudo target to arrive at the target. On local I have a id_rsa and on the jump I have to use roots id_rsa. With the following config a can do on local ...
Thomas Richter's user avatar
1 vote
0 answers
1k views

scp multiple files with single command

I have seen this question: https://stackoverflow.com/questions/16886179/scp-or-sftp-copy-multiple-files-with-single-command But for some reason it does not work for me. If I run: scp me@remote:/path/...
user17004502's user avatar
1 vote
1 answer
62 views

How to copy directory from remote machine which requires a specific UNIX group?

I need to copy automatically a list of directories from a remote machine into a local machine. Up to now, I was using rsync or scp for that: > rsync -a $USER@$HOST:/remote/a/b/c /a/b/c Now, the ...
vesii's user avatar
  • 193
1 vote
0 answers
1k views

Remote SSH connection from one server to another HANGS, no fail, no error

Trying to copy files from one server to another because the amount of files is not feasible to do by copying to my home pc and then out to second server. SSH, rync, and scp all hang from either server,...
user7211's user avatar
1 vote
1 answer
279 views

tcpdump in Kali Linux VM does not capture scp between two devices

Situation: I'm learning how to develop tests for a hardened server my company is developing for a client. The test configuration will consist of the test target (the server we're developing) and an ...
placebo_me_please's user avatar
1 vote
0 answers
398 views

Unable to re-enable ssh root login in CentOS

I need to be able to copy some files using scp as root, and for this I need to enable ssh login as root; so I edited the file /etc/ssh/sshd_config by changing PermitRootLogin no to PermitRootLogin yes,...
sequence's user avatar
  • 281
1 vote
0 answers
140 views

How to scp using "Safeguard for Privileged Passwords" string

I want to copy file to the server with address target_ip. And I have Safeguard system which generates hostname string like vaultaddress=11.34.5.123@token=EyUusdfsdfEFEFDSCDFVfXEqFsdcsdcsdPe3s@username@...
TiGRoNdev's user avatar
1 vote
0 answers
224 views

Transferring Files from Remote Server to PC using SCP

I am trying to use the command, scp -r [email protected]:/pathto/my/workfolder/ C:/MyPC/Downloads/ to copy workfolder to my PC. However, although some files have been downloaded successfully,...
GISEnthu's user avatar
1 vote
1 answer
127 views

tar local folder and transfer sensitive data to remote machine vs rsync

I need to backup some important data from local folder and transfer it to remote machine - worker01 so I think to tar the local folder and send the tar to remote machine as the following tar zcvf - /...
yael's user avatar
  • 12.8k
1 vote
0 answers
50 views

Three identical servers -- all accept a 61 kilobyte file over scp, but two refuse anything over 62 kilobytes

I've got three VM servers, running the same Ubuntu 18.04 LTS. Identifiers, with an incremental IP range: 99.99.99.140 99.99.99.141 99.99.99.142 One of them (.141) is giving serious issues when ...
Mave's user avatar
  • 111
1 vote
1 answer
294 views

Copy directory structure and sample of files from remote system

I would like to recreate the directory structure from a remote system to a local system and copy a sample of the files in each directory (e.g. copy only 5 files from each directory). There may be many ...
Dan's user avatar
  • 11
1 vote
0 answers
292 views

How to SCP the output of a command from a remote server to another remote server?

I am connected to a remote machine ( server1 ). On server1 I want to make a script that is copying & renaming some files that have a specific size but to rename them only after they are ...
Teodor's user avatar
  • 55
1 vote
0 answers
2k 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/...
Mike M's user avatar
  • 11
1 vote
0 answers
165 views

How do I merge identically named files?

My question is similar to this one but the answers don't address how I would like to solve it in my case: Background: I have two computers generating experimental results that are filed in ...
Bill's user avatar
  • 129
1 vote
0 answers
2k views

When using scp command, it fails as 'bash: bash command not found' . How to resolve it?

When i am trying to copy a file using scp, it says bash: bash:: command not found. I am able to execute help command for scp but unable to use it. [root@centosgui ansibleplay]# scp --help unknown ...
Samselvaprabu's user avatar
1 vote
1 answer
1k views

Unintentional bandwidth throttling — where else to look?

This is embarrassing, but I seem to have inadvertently set a persistent bandwidth throttle on SSH connections from my Ubuntu machine. When transferring files from a remote server via scp, sftp, or ...
John Furrow's user avatar
1 vote
1 answer
855 views

Error copying directory from a remote host to another remote host with 'scp'

From my laptop, I'm trying to copy a directory of files from one Raspberry Pi ([email protected]) to another ([email protected]): ~/example$ scp -r [email protected]:~/example/files_to_send [email protected]:...
R.Neville's user avatar
1 vote
2 answers
198 views

scp or rsync analogue for cp -T (treat target as file)

With cp I can: $ mkdir q $ touch s $ cp -T s q # I need same effect with scp and/or rsync. cp: cannot overwrite directory 'q' with non-directory $ ls q How do I get same effect in one command with ...
George Sovetov's user avatar
1 vote
0 answers
1k views

scp attempt in a bash script triggered by cron fails; works when run script manually

Trying to scp a file in a bash script that's scheduled by cron. When cron triggers it, the scp fails with a permission denied error message. When I run the script manually using a command like: /...
dot's user avatar
  • 695
1 vote
0 answers
2k views

Remote copy via SCP doesn't work in background

The situation: I'm switching file servers at home. I want to copy tons of data from one Synology Disk Station to another. My Approach: #Via SSH on the new server: nohup scp -r ${old_server}:. . I ...
lukmi's user avatar
  • 73
1 vote
0 answers
795 views

Use sshpass to scp files from two remote hosts

I have the following problem. I have sshpass installed on Server A. I have files on Server B that I need to copy to Server C. (Servers B and C don't have sshpass installed, and are in another ...
tmorais's user avatar
  • 11
1 vote
0 answers
350 views

scp - How to list the path of transferring files?

While using scp recursively using -r option, is there a way to list the full path of the files while they are being copied, and not merely the file name?
João Pimentel Ferreira's user avatar
1 vote
1 answer
914 views

Extract contents of jar file to curl using scp

I have a jar file containing a javadoc tree on one box. I need to transfer it to another box and unpack the jar in a specific directory (which may not exist). I have the username/password of the ...
David M. Karr's user avatar
1 vote
1 answer
194 views

Pipe data onto another machine with nologin

I have a huge directory I want to copy to another machine as a .tar.gz file. I don't have a lot of space on either machine, so I'd like to copy the file through a pipe, like this: tar -czf - ...
Dan's user avatar
  • 9,442
1 vote
0 answers
40 views

Folder name changed when SCP from iPhone to Synology server

This is the first time I've posted here. I've used the scp command from iPhone ios 8.4 (jailbroken) Mterminal to transfer a folder over to my Synology NAS. scp -P "private port" -r "...
djnetics's user avatar
1 vote
0 answers
421 views

not able to use scponly for the scp operation

I have installed scponly on my system under /usr/bin/scponly. However, when trying to perform scp operation from the external linux box, I got the following error: onx-jozhao-01|~/dcu/scpTest$ scp ...
Joe Zhao's user avatar
1 vote
0 answers
505 views

download file/backup from remote server to desktop without SSH or SCP?

Issue Background I was trying to install uTorrent on my PHP site and mid-process I was kicked out of SSH and the website went down. libssl.so.1.0.0 and libcrypto.so.1.0.0 were required for uTorrent ...
Brett's user avatar
  • 11