Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
26 views

scp or rsync multiple files from source server to another servers

Since my nfs is a win type of server, it can't contain :. I want to copy multiple files from source server to the nfs directory on another server and rename them at the same time. The script looks ...
6
votes
2answers
262 views

Ssh No route to host

I am trying to copy my Corosync key from my desktop to my laptop. sudo scp /etc/corosync/authkey mm-HP-Elit@192.168.0.10:~ What I got is this ssh: connect to host 192.168.0.10 port 22: No route ...
0
votes
0answers
30 views

Folder transfer with scp command

I want to transfer my folder from my computer to server by using scp command. Folder structure like these : FOLDER/SubFolders/*.json. There are more than 1 SubFolders. Each of them has different JSON ...
1
vote
0answers
56 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 ...
0
votes
1answer
34 views

cat and xargs with scp : No such file or directory

I'm trying to copy files from a remote machine to my local machine: resource.txt /path/dir/file1.txt /path/dir/file2.txt /path/dir/file3.txt cat resource.txt | xargs -I F scp <user@ip>:F /...
-1
votes
3answers
70 views

Variable for SCP command in script

I'm trying to write a script that will check what is the last modified/created file on the server, then copy it to my homedirectory on this server and then copy this file from node to my local machine....
2
votes
0answers
48 views

Copying contents of a folder via SCP results in `scp: error: unexpected filename: .`

I was using a script to copy the contents of a folder via SCP, without copying the folder itself. Something like this: scp -i id_rsa -P "$PORT" -r "$HOST:/folder1/folder2/." "backup" (I'm not able ...
0
votes
1answer
43 views

Copy file from one remote server to another remote server

I am at server A. I want to copy a file from remote server B to remote server C. This can be done with below commands, scp username@B:/path_of_file_on_server_B/file.txt /path_of_file_on_server_A scp ...
1
vote
0answers
73 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 ...
0
votes
2answers
31 views

how to obtain a file in an interactive bash shell session

Not sure if I ask this correctly. I am doing some pentest practice, and in a bash shell session, I want to download a file. I tried cp to that machine, but it just creates a file in the current ...
5
votes
1answer
288 views

Unix AIX passing variable and arguments to expect and spawn

I am writing a script to scp some files but need to pass file location through the user or another script as an argument #!/usr/bin/expect set FILEPATH1 $1 spawn sh "scp $FILEPATH1 $USER@$HOST:/...
1
vote
1answer
54 views

Why does Unix ask for password when I try to pull a file with permission 777 using scp?

Let us consider that I have a file /home/base/alpha.txt with permission 777 i.e. -rwxrwxrwx in user@host. Now, from system host1 as user1 i.e. user1@host1, I try to pull the file mentioned above using ...
0
votes
0answers
25 views

Backup interruption using scp. How to exclude files just downloaded?

I need to backup a huge folder (more than 100 GB) from an external server. I use scp command in a linux terminal but connection issues happen sometimes. So I need to restart the procedure every time. ...
-1
votes
3answers
129 views

Use scp to copy files of specific extension from directory

I'm writing a bash script that needs to fetch all *_out.csv from a directory, on a remote server. All these files are several directories deep inside of another directory. So for instance, say the ...
1
vote
2answers
39 views

How to copy files with certain extensions keeping the path from remote to local machine via scp --parents?

I want to copy all *out from various subdirectories from my remote account to my local machine my trail is scp --parents -r @remote:~/path/*out . this trail doesn't work I am wondering about the ...
0
votes
0answers
91 views

SFTP upload directories and files to a VM

I have 2 directories and 4 files drwxr-xr-x 8 root root 4096 Jun 30 2018 apache2 <<< 📁 drwx------ 2 root root 4096 Jan 23 19:40 .ssh <<< 📁 drwx------ 10 root root 4096 Mar 12 ...
1
vote
0answers
281 views

SCP gets broken pipe, but meanwhile ssh works well

I'm using Mac to ssh and scp to multiple servers (after I VPN into my company's network from my Mac at home). I can ssh from Mac via VPN to servers (I call them server A, B, and C), all the time ...
0
votes
0answers
90 views

Passwordless SCP from automated script - NO ADMIN RIGHTS server side

I have a cloudways server with no admin rights. I have set up ssh keys using their website interface, to use ssh and scp without passwords from a raspberry pi 3b+ running stretch, however i am having ...
0
votes
1answer
129 views

scp <source>:<filepath> <dest> works from command line, but cp: cannot stat error from script. Why?

I am using scp to copy a file from a server to my computer. The command works fine when I type it from the command line, but when I try to make a script to do it, it fails with a "cp: cannot stat" ...
0
votes
1answer
1k views

Scp transfer: Permission denied [closed]

Nothing that I have tried so far has worked; every time I try to transfer my file from one of my servers to the other it asks for a password and it always says permission denied (and before you ask I'...
0
votes
1answer
201 views

Use SCP from local machine to recursively copy current working directory to remote?

Trying to do something like (in pseudo-unix): scp -r <pwd> username@remote.com:~/<dirname of toplevel> In other words, I'm trying to copy the current directory I'm in locally (and the ...
6
votes
1answer
466 views

Why does scp's strict filename checking reject quoted last component but not others?

When I try to scp a file with a slash in its path, the path is quoted for the local host, and the last path component is additionally quoted for the remote host, like scp host:"a/b/'c'" ., it fails ...
0
votes
1answer
180 views

Krusader Configuration for SCP [duplicate]

A remote router is accessible via SSH: 16.04 scp copies files back and forth from the command line. ASUSWRT-Merlin RT-AC68U 384.7-2 Sun Oct 21 17:18:03 UTC 2018 USER@router:/tmp/home/root# # ...
2
votes
3answers
84 views

Copying Hundred of Thousands Files from Remote Directory to Another Remote Directory

I have a remote directory (SSH enabled) on 11.11.11.11/:/path/from (an Ubuntu machine) that has millions of tiny .txt small size files, doing like simple ls command or even opening the /path/from/ ...
1
vote
2answers
28 views

Copy mail file from maildir over ssh [duplicate]

The maildir has a specific format of the files laying underneath, e.g. 1549464014.9224_427.hostname:2,RS. In Debian environment copying this file over SSH without renaming is impossible or I don't ...
1
vote
1answer
178 views

Error in scp connection in Linux

I have got an below error while executing the below command while placing a file in gatekeeper example server through a script. scp -oHostKeyAlgorithms=+ssh-dss -i ~/.ssh/gatekeeper -P 18000 /var/...
0
votes
1answer
1k views

Jenkins pipeline: scp tries to copy to other remote, Host key verification failed [duplicate]

I use Jenkins in ubuntu server. In this case, I want to copy a file to another remote server. I use SCP command inside sshagent the Jenkins pipeline. I tried the solution from unable to scp in ...
0
votes
0answers
239 views

scp: Failed to open file /my/Path/test.txt on Windows Server

I have been trying to copy a file from a remote Windows Server to my local docker image from my local docker image and I keep getting the error 'scp:Failed to open File /my/Path/test.txt'.My ...
2
votes
0answers
229 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 ...
0
votes
1answer
38 views

SCP not willing to transfer remote to remote

My family and I are attempting to sync all our data across multiple locations and devices. Seeing as we are just setting it up, we were wanting to start with the basics before building on it further, ...
1
vote
1answer
190 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 ...
0
votes
1answer
63 views

Using service account to copy the apps

Currently we are having Git repository which is configured with srvapps (service account).I can sudo to the Git server using this account (username - srvapps and password - my login password). My ...
1
vote
0answers
194 views

input/output error using scp with external HD [closed]

I'm transferring large batch of files from a external HD via scp, between a raspberry pi and my desktop. The external HD is formatted as exFAT. Looking back, many of the files contained an input/...
0
votes
1answer
81 views

SCP requires password but if I SSH to the same server it does not

So I setup ssh keys, tested it via cli and all works great. When I go to run a SCP file transfer it asks for my password for both machines, yet if I simply ssh to the same server it does not. Below ...
0
votes
2answers
242 views

wget and scp as a pipeline

Can we use wget and scp as a pipeline. I want to wget a file from a server and copy to another server. I used below command but it is not working. wget "$Select_Release_Version_ARTIFACT_URL" | sudo ...
0
votes
2answers
191 views

Download data from DropBox to remote server (via scp)

I'm trying to transfer some large, gzipped files from a collaborator's DropBox to a remote server. Is there a way to do this with scp? Or is there a preferred method? Thank you in advance!
0
votes
1answer
104 views

scp/rsync autocomplete works one way but not the other

I have two machines, laptop and server. Both of them source /etc/bash_completion in .bashrc. What works: server$ scp file laptop:~/stage/[tab][tab] server$ scp laptop:~/stage/[tab][tab] . server$ ...
1
vote
0answers
53 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 ...
1
vote
0answers
38 views

SCP after a file has reached completion [closed]

I would like to create something that would look to see if a specific zip file is done increasing in size, then scp it to another server. These zip files get created at many different times of day, ...
0
votes
1answer
43 views

what is the right approach to copy folder content that include links

we have the following folders / links /files under /usr/hdp/2.6.0.3-8/zookeeper folder -rw-r--r--. 1 root root 794542 Apr 1 2017 zookeeper-3.4.6.2.6.0.3-8.jar drwxr-xr-x. 6 root root 4096 Mar 28 ...
0
votes
2answers
30 views

I want to transfer data from AWS to my physical computer using scp command

My AWS server has public IP address a.b.c.d and my computer has private IP address 192.168.1.25 and public IP address x.y.z.t How do I transfer data using scp command?
1
vote
1answer
87 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 (pi@192.168.2.22) to another (pi@192.168.2.21): ~/example$ scp -r pi@192.168.2.22:~/example/files_to_send pi@192.168.2.21:...
1
vote
1answer
705 views

Transferring files from remote host to local with sshpass

I want to transfer files which are older then 40 days from remote to local host. I am able to connect the remote server but unable to transfer the files from remote to local server. It results into ...
4
votes
0answers
96 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 ...
1
vote
0answers
214 views

Create new file after `scp` in remote script [closed]

Learning bash and trying to copy a file from a local machine to a remote machine. I would like to create a simple .txt file on the local machine that logs a success. This is my first foray into bash, ...
0
votes
1answer
142 views

scp file from machine A to machine with no password prompt and copy same file to different location

I am trying to write a shell script through which i want to copy file from machineA to machine B.I have already setup passwordless connection .In the machine B again the samefile i want to copy to ...
1
vote
1answer
297 views

What happens with simultaneous scp and mv?

What happens when I scp large file from computer A to computer B, then move mv that file to a different location on the same partition of computer B before the scp is complete? I assume just the ...
0
votes
1answer
335 views

Where does SCP keep its Known_Hosts info

I am looking for the file in which scp keeps known_hosts information. Can anyone direct me where this would be on Linux? I have looked in my $HOME/.ssh directory but the information is not kept there....
1
vote
2answers
89 views

Transferring file from local computer to remote server

I would like to transfer a zip file from my local server to a remote server. I used the following command which contain host, port, and username as follows: scp "$somepath/${file}.zip" "$ftp_user"@"...
1
vote
0answers
48 views

escape the '\' character when using scp [closed]

So I'm doing a Jenkins course, I have a script that will copy an item, using a private key, but the Jenkins and the key is on a windows pc, and the path to the key is C:\tomcat.pem. I don't know how ...