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

learn more… | top users | synonyms

2
votes
2answers
184 views

How can I set up one-way scp?

I've got a remote server my.server.com and I'd like to allow another user (stranger) to scp files onto the box. Goals: give as little access to the stranger user as possible stranger should not be ...
1
vote
1answer
26 views

Push/Pull files among Unix machines with private key on Windows

I am operating across three systems: A remote Unix machine (let's call it Unix1), which stores some files A local Windows machine (let's call it win1), which stores the private key to Unix1 A ...
4
votes
1answer
44 views

Prevent processing file until SCP transfer is finished

Large files are transferred to a server for processing. The server monitors a specific directory using incrond and when a new file is received the processing script is executed for that file. Because ...
-1
votes
2answers
39 views

scp a file to multiple folders

I wanted to scp file.txt to remote box my-remote-vm-1 In my-remote-vm-1 there are two folders conf-1-ver-2,conf-2-ver-2. The integer part in the folder name can go from [0-9]. What would be the best ...
1
vote
2answers
49 views

How can I save password,when copy a file using SCP?

I am new in here. I am facing problem when I pull a file from another machine to my machine using SCP. File is successfully transferred but each time it asks for password. I want to run this SCP ...
55
votes
5answers
56k views

scp without replacing existing files in the destination

How do I copy an entire directory into a directory of the same name without replacing the content in the destination directory? (instead, I would like to add to the contents of the destination folder) ...
-1
votes
0answers
14 views

How to insert password in response to syestem request using shell script [duplicate]

I've problem to automatically insert password when i try connection to remote server using scp. my script is like that : TARGET_DIR=MY_TARGET_DIR REMOTE_DIR=MY_REMOTE_DIR hosts=(user1@host1 ...
1
vote
1answer
46 views

Fastest file copying within sshfs directory (rsync?)

I have a directory on a remote server remote1, mounted via sshfs. I am installing new versions of some of the files in the remote directory, which are quite large (~50M). I am currently using ...
0
votes
2answers
32 views

scp requirements for batch mode

I'm launching a script from a Jenkins server (on RHEL6) that, among other things, uses SCP with "BatchMode yes" to copy a file from a remote machine. The script runs properly outside of Jenkins, but ...
6
votes
5answers
27k views

Scp from one server to another server?

I am trying to copy files from one server directly to another, bypassing my local computer. I did scp -r usrname@server1.com:~/data/* usrname@server2.com:~/data/ Password: Host key verification ...
2
votes
3answers
91 views

Do I need to check for file corruption once scp is done?

I have recursively transferred many files and folders with scp, using the command: scp -rp /source/folder myremoteusername@122.10.12.123:/destination/folder After the transfer is completed, do I ...
-1
votes
2answers
179 views

How to use scp and ssh command in a single script without any keys?

How to use scp and ssh command in a same script? First I have to copy one file from my local server to remote. Then from local server itself, I have to check the size of the copied file.
0
votes
0answers
15 views

Configuring a linux server for receiving Cisco IronPort logs via SCP

I am currently working on getting proxy logs from a IronPort via SCP to my Linux box. I have generated the authorized_keys file and put the public key in the file but I still get: Log Error: Push ...
3
votes
1answer
24 views

Expect to scp directory does not work when run from post commit

I am trying to implement a post-commit hook on svn which will scp some files from the svn machine to some other backup machine after each commit. I have written the script with expect as follows ...
12
votes
4answers
9k views

Autocomplete server names for SSH and SCP

I have a few servers configured in ~/.ssh/config, such as alpha and beta. How might I configure Bash such that the commands ssh al<tab> and scp file.tgz al<tab> autocomplete the names of ...
1
vote
1answer
53 views

Concat all remotely distributed files in your cluster

I want to concatenate all abc_2015-12-15.txt files present on my cluster.Is there any best way to achieve this ? One way is to use below command across all nodes till all files concatenated :- ssh ...
4
votes
6answers
47k views

Transfer files using scp: permission denied

I try to transfer files from remote computer using ssh to my computer : scp My_file.txt user_id@server:/Home This should put My_file.txt in the home folder on my own computer, right? I get ...
18
votes
4answers
12k views

What's the difference between SFTP, SCP and FISH protocols?

I used to think SCP is a tool to copy files over SSH, and copying files over SSH is called SFTP, which is itself a synonym to FISH. But now as I was looking for a Total Commander plugin to do this in ...
5
votes
2answers
36k views

How to copy a file from remote server to local machine?

In my terminal shell, I ssh'ed into a remote server, and I cd to the directory I want. Now in this directory, there is a file called table that I want to copy to my local machine /home/me/Desktop. How ...
0
votes
1answer
64 views

scp with sshpass - remote directory and file with wildcards

I have a list with 950 MongoDB VMs I wish to collect all mongodb.log. The path to log file is depending on database name. for i in $(cat /tmp/mongonodes.txt) ; do sshpass -p34dDgdWger@rg4fll434ef ...
1
vote
2answers
169 views

Scp command over ssh without password in script

Here is my problem: I would like to perform scp command after ssh to remote server without typing any passwords. I describe my steps. My first steps were: ssh-keygen -t rsa and local@host$ ...
1
vote
2answers
52 views

Automatic and secure file transfer over two servers

the problem is how to automatically transfer backups from server A to server B in the best possible way in terms of security? Here is what comes to my mind: authorize server A pub key to access ...
1
vote
2answers
39 views

Permission denied scp'ing large file

I'm trying to copy a 4.5GB file to my Raspberry Pi: scp -r ~/firmware/ pi@192.168.2.8:/opt/ pi@192.168.2.8's password: scp: /opt//firmware/.DS_Store: Permission denied scp: /opt//firmware/.git: ...
0
votes
2answers
38 views

File Transfer from Unix to Windows network shared location

How can I move the files from unix path to windows network shared path and the file should be moved to respective folder in shared path and if not then it is to create a folder based on file name and ...
13
votes
3answers
37k views

How to pull a file from a server using scp?

I am on machine A and want to pull a file from machine B. A$ scp <myuserid>@hostB:<path of file in B> . it says that: scp: <path of file in B>: No such file or directory But on ...
1
vote
1answer
178 views

scp can't upload/download files even though ssh works

I can connect to my server using ssh dziura and it works as it should, but I have problems copying any files to/from the server using rsync/scp/sftp. Scp: $ scp dziura:/home/kossak/file_remote.txt . ...
2
votes
1answer
76 views

scp file as another group

I would like to scp a file, however my primary group does not match the permissions of the destination directory so I get a permission denied message when I try to scp. I have the correct group as a ...
11
votes
4answers
3k views

Why is scp so slow and how to make it faster?

I'm trying to copy a batch of files with scp but it is very slow. This is an example with 10 files: $ time scp cap_* user@host:~/dir cap_20151023T113018_704979707.png 100% 413KB 413.2KB/s 00:00 ...
0
votes
1answer
126 views

I can't copy remote file using scp but I can log in using ssh

I've a NAS DNS-320L from dlink running the original firmware + fun_plug which enable NAS to receive ssh connections. I can use the user ricardo to log into the server by ssh. [ricardo@crudo:~]$ ssh ...
2
votes
1answer
289 views

scp does not honor .ssh/config

Used for a few years arcfour as default cipher for SSH2 connection in my ~/.ssh/config file host namaka hostname localhost port 2022 ciphers arcfour IdentityFile ~/.ssh/virtualbox ...
1
vote
1answer
56 views

Getting error with rsync and scp

My issue is an odd one. I am logged into my University's server with my host name and all that good stuff. I am able to copy files from my local computer into my school's account. My issue, is the ...
0
votes
3answers
403 views

Copy and get files from one machine which is connected via ssh to another one

I read a lot of answers to questions very similar to this one, but I couldn't find something that really fits my problem. Here's the situation. I have a machine whose address is "machine1@address", ...
2
votes
2answers
2k views

How to view progress with sshpass and scp in linux?

In my Linux terminal, I am using this command sshpass -p "pass" scp -r me8@host.ca:/cmshome/me/file /home/me/Desktop to download a file with a password in it. Without the sshpass, I can see the ...
-2
votes
1answer
33 views

Update files from server to server

I am building a tool using bash script, to move the files from server to server. But the tool for update, so I don't want to overwrite the exist files, in the other server from the first moment. I ...
1
vote
3answers
1k views

Shell script for ssh into a Unix/Linux server from MacOS X 10.10

I am attempting to ssh into a server by using a bash script from MacOSX. #!/bin/bash spawn ssh username@gatewayserver expect "password" send "Mypassword\r" interact spawn ssh ...
0
votes
2answers
95 views

How to copy all files from a directory to a remote directory using scp?

My goal is copy only all files from ~/local_dir to user@host.com /var/www/html/target_dir using scp and do not create local_dir category in local_dir. /var/www/html/target_dir/files.. but not ...
4
votes
4answers
344 views

Run the same script on several servers through SSH

I regularly need to update some Ubuntu 12.04 (Precise Pangolin) servers (Rackspace). What I do now is: Copy a file to a server using SCP Log on to the server using SSH Stop Tomcat Do some ...
3
votes
2answers
53 views

While logged in to remote, cannot push a file from remote back to local host

I am logged in to a remote host and trying to push a file back to my local machine. Using scp myusername@university_computer:/home/myusername/filename /home/myname/folder results in the error ...
1
vote
2answers
184 views

not able to execute multiple commands on multiple linux machines?

I have around 50 ubuntu machines on which I need to run below commands: sudo apt-get install htop sudo scp -r todd@machineA.host.com:/home/todd/pip /tmp/ sudo apt-get install python-pip sudo pip ...
0
votes
1answer
26 views

Cleanup archive and archive files only if sources exist using rsync, scp or sftp

I have to cleanup an archive directory on a remote host only if there are files to be archived; the source files are on the same host. I should run something similar to: cd $source_dir if [ -f ...
0
votes
0answers
45 views

rcp stop working after ssh fail

I want to copy too many small files within my private network, I don't want to scp it, So I used rcp to make it faster and so that it runs on rshell. I had previously created ssh connection. I have ...
25
votes
2answers
37k views

scp and compress at the same time, no intermediate save

What is the canonical way to: scp a file to a remote location compress the file in transit (tar or not, single file or whole folder, 7za or something else even more efficient) do the above without ...
0
votes
1answer
44 views

SSH to 2 local machines via Unix server

Here is the situation: I have a Windows home machine Home which I can connect to Foo, a Unix server via ssh. Then I can ssh from my Unix work machine Bar to this same server Foo. Windows ...
1
vote
0answers
261 views

Why does rsync -e 'ssh' work but not rsync --rsh=ssh [closed]

This works: rsync -P --partial -e 'ssh -p 12345' me@host:/path . This doesn't: rsync -P --partial --rsh=ssh --port=12345 me@host:/path . AFIK they're supposed to do the same thing. What have I ...
0
votes
2answers
75 views

How to scp self?

I want to scp from myself to myself, but am getting Permission denied (publickey) errors. This is more of a edge case of a script, but I feel like there shouldn't be an issue with it. ifconfig | ...
1
vote
2answers
107 views

Copy files between two hosts

How can I copy files between two hosts the first primary host is running Linux and the secondary host is running Windows. I am looking for a correct command line to use it in terminal/Linux? I tried ...
0
votes
1answer
61 views

How to pull one day old data from remote server to local server?

From what I have searched till now I only found command to PUSH one day old data from local server to remoteServer but what I want is to PULL one day old data from remoteServer to localServer. I ...
1
vote
3answers
10k views

How to copy only new files using “scp” command?

I was copying hundreds of files to another computer using the scp command that I got the stalled error. Now I am going to copy the files again. Is there any way to avoid copying the already copied ...
0
votes
0answers
961 views

scp ssh: connect to host 10.0.0.109 port 22: No route to host lost connection

I use SCP command on Debian Linux to transfer a file to my colleague via LAN. But I encounter the problem: $ scp filename.file username@10.0.0.109:/tmp ssh: connect to host 10.0.0.109 port 22: No ...
1
vote
1answer
528 views

How to use SFTP in a script to non-interactively pull file from remote host?

I want to use a shell script to pull a file from another server. I have written a script where i can do this but i want the script to work non-interactively so that it doesn't prompt me for the ...