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

3
votes
2answers
58 views

transfer a file to remote dir only if doesn't exist without replacing

I'm using CentOS linux. In one line cmd, that returns 0 if success, non-0 if failure, I need: Transfer a file to a remote server. Don't transfer the file if filename exists in remote server ...
1
vote
1answer
29 views

Using scp to transfer files to an android device

I have a file on a remote server that I want to transfer to my android device over ssh, only using the android device in the process. Using this setup, I tried an scp from the android device ...
1
vote
2answers
31 views

scp and file owner

What are the reasons that could make a change in a file ownership after scp'ing it from one server to another? The file ownership changed from 'owner' to 'apache'. I used scp -p . The user 'owner' ...
0
votes
5answers
63 views

Downloading file through SSH with a “proxy” machine inbetween

I need to download a file from machine C to machine A. To do that, I need to login to machine B (I am doing this using scp), as I cannot access C directly from A. Would it be possible to download a ...
1
vote
2answers
62 views

SCP Automation in production environment [duplicate]

I want to implement the use of scp command in a production environment. I don't want to provide my password in the automation script. Is there any way? I need step by step solution.
1
vote
2answers
80 views

Shell Script - how to scp into remote server and download files and protect password

I have a remote server that I need to download Apache logs from. I can manually scp into the server and get the files, but I'd like to put this in crontab. The only way to automate it is to include ...
1
vote
3answers
56 views

How to upload a file from Windows to Linux?

I'm using Windows. I want to upload a file to Amazon server using putty from my Windows system. How to do this using scp or any other command? How do I download a file from the Amazon server to my ...
3
votes
3answers
79 views

What perl script will scp directory with spaces in name?

I"ve been trying for several hours to figure out how to get perl to scp a directory with a space in the name. I'm currently getting the error scp: ambiguous target Here is the script that is not ...
-1
votes
0answers
29 views

Can't overwrite a file with WinSCP

I don't know how to fix this problem. I'm using WinSCP (on Windows) when I want to remove or edit admins in a file on a Linux system, user.ini. When I click save it gives me this error: General ...
1
vote
5answers
87 views

How to copy a file from a remote network to the local desktop

So I used SSH to remotely login to another computer on a network. I have many files that I would like to copy over to my local desktop. I am trying to follow this How-to : However, I think one ...
3
votes
1answer
112 views

scp does not transfer files correctly

I am using scp to transfer some large files (> 1 GB) from my laptop (Ubuntu 12.04) to my desktop (Ubuntu 14.04). The laptop has a wireless connection to my router and the desktop has a cable ...
1
vote
1answer
38 views

How can I return a specific error code at this point in my TCL script?

I have a TCL expect script that runs a scp command for uploading a config file to my DNS server: #!/usr/bin/expect -f set config "~/dnsmasq.conf" spawn /usr/bin/scp "$config" ...
0
votes
1answer
48 views

Equivalent of scp -l bandwidth_cap for .ssh/config?

Short form: You can limit the bandwidth the scp uses with the -l switch, you pass a number that's in kbits/sec. I'd rather set this in my .ssh/config file for certain names machines. What's the ...
1
vote
1answer
53 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
2answers
59 views

Copying latest files from the remote servers

We run report on multiple remote servers which we pick up monthly on our central server. The whole process is automated with scp and working well. The issue is that sometimes we go on individual ...
1
vote
1answer
48 views

How to scp from remote host to remote host with pem files and turning off strict host checking?

From my DEV server I'd like to copy files from my stage server to my prod server. I already have SSH keys setup between my DEV server and my stage server. But I haven't had any success trying to ...
1
vote
2answers
708 views

Java code to copy files from one linux machine to another linux machine

I'm looking for java code to copy files to a remote linux system. I have tried Runtime.getRuntime().exec() function by passing an scp command, but each time I run the program it is asking for the ...
2
votes
1answer
27 views

Unable to winscp png files

I have a few PNG files that need to be scp'd to a Linux box. I'm using winscp and when I copy for some reason the number of bytes transferred is zero and in turn the file is empty.. What option needs ...
1
vote
0answers
279 views

How to use rsync with GNU parallel?

I am using scp to copy the files in parallel using GNU parallel with my below shell script and it is working fine. I am not sure how can I use rsync in place of scp in my below shell script. I am ...
1
vote
1answer
75 views

How to copy in two folders simultaneously using GNU parallel by spawning multiple threads?

I am trying to copy files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for ...
8
votes
4answers
522 views

How do I copy a file from multiple servers to my local system?

We have multiple deployment of an application on servers such as app00, app01 and so on. I need to copy a single log file from all these servers onto my local mac so I can perform some grepping and ...
0
votes
1answer
17 views

Change OpenVPN client, can I use the same server configurations using scp?

I want to change my old FC 4 client to new Fedora 19 client, but I need to use all the same files on openvpn and IP address. Can I use SCP command for copy all this configurations? Thanks!
2
votes
3answers
350 views

How to launch two threads in bash shell script?

I am trying to copy files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for ...
0
votes
2answers
119 views

Bad configuration option: ControlPersist while scp with control master?

I am using SCP with ControlMaster to copy the files but somehow I am getting this error back - command-line: line 0: Bad configuration option: ControlPersist command-line: line 0: Bad configuration ...
2
votes
3answers
87 views

How to split the array in set of five files and download them in parallel?

I am trying to copy files from testMachineB and testMachineC into testMachineA as I am running my shell script on testMachineA. If the file is not there in testMachineB, then it should be there in ...
0
votes
1answer
96 views

scp to Local Machine After SSHing [duplicate]

From my local machine I can copy files from a remote machine scp remote:/some/file/path ~ But what if I'm already SSHed into the remote machine? Can I do something like this ssh remote cd ...
0
votes
1answer
36 views

Unrar local files to remote server [duplicate]

I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2. The problem is: I do not have enough storage to ...
3
votes
1answer
61 views

Unrar local files to remote server

I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2. The problem is: I do not have enough storage to ...
1
vote
2answers
139 views

How to copy three files at once instead of one file at a time in bash shell scripting?

I am running my shell script on machineA which copies the files from machineB and machineC to machineA. If the file is not there in machineB, then it should be there in machineC for sure. So I will ...
0
votes
0answers
25 views

How to copy remote files to local if you don't have permission on the remote directory? [duplicate]

We have a Linux Server where our site is hosted. The server is a tomcat server and I want to access the logs located at /var/log/tomcat7. I wanted to tail the logs of the remote server. First I did ...
0
votes
1answer
61 views

Mount a dropbox directory without installing the dropbox application

This is most likely to be a duplicate question, but I could not find a simple answer for my problem. My situation is as follows: I have multiple accounts on different computing clusters. I want to ...
5
votes
2answers
214 views

How to input a network file using scp to ffmpeg

My problem is this. I have access to a server that hosts many video files, most of them are very large and not well compressed. I intend to make a reduced quality smaller size copy of these on my ...
0
votes
1answer
91 views

scp between two servers with different pem files

I'm following the answer on How to scp from server to server with different public keys? but I'm getting a connection error: # start the agent and capture its environment in the current shell eval ...
0
votes
2answers
53 views

what is the purpose of -i in front of scp and ssh commands?

What is the "-i" for in the command "scp -i key *username*@address: path 1 *path 2*"? Note: I've seen "-i" used in ssh commands as well.
1
vote
2answers
2k views

Use scp to transfer a file from local directory X to remote directory Y

I took a look around at other questions here and at various "scp usage" tutorials on Internet, but I can't sort out what's wrong. I'm using Linux Mint and I'm trying to figure out how scp works. ...
0
votes
0answers
23 views

How to allow user to only rsync/download only one directory through SSH [duplicate]

What I want to do is to give to user a simple script to run, that will sync some directory from my VPS to their machine, authentication would be done by using pubkey, and I would like to have control ...
3
votes
3answers
212 views

How to parallelize the for loop while scp the files?

I am running my below shell script from machineA which is copying the files machineB and machineC into machineA. If the files are not there in machineB, then it should be there in machineC. The below ...
-2
votes
1answer
73 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.
2
votes
1answer
140 views

How to copy a debootstrap (chroot) directory to another computer?

I created an installation of Debian in a subdirectory using debootstrap on computer A. Now I would like to transfer this installation to computer B which has a local connection but no global internet ...
0
votes
2answers
86 views

Can using SFTP with HMAC-RIPEMD160 replace computing file hashes before and after transferring?

As part of my job I often find myself transferring lots of files between my computer and a remote storage space accessible over SFTP. To ensure the files' correct transfer I compute their SHA256 ...
1
vote
2answers
71 views

Download the file from either of two machines using SCP?

I have a below bash shell script which I am running from machineA and that shell script will try to download a tar file from either of these two machines machineB and machineC and put it in ...
1
vote
1answer
53 views

Putting two accounts in group not giving read access to group members

I have an Apache based web site and am trying to allow the user to upload files to a drop box on one machine and then have them transferred to another. So I form a group for two users: www-data which ...
1
vote
1answer
105 views

How to copy files within a remote server?

I would like to copy files in an remote server from one directory (in the remote server) to another (also in the same remote server). I tried this: scp -r myacc@remote.server:/folder_a/*myfiles* ...
1
vote
0answers
122 views

file transfer with SCP to Virtual Machine [closed]

I am trying to transfer files over to my virtual machine I tried the command scp files user@xxx.xx.xx.xxx:/home/user/directory I am later asked to enter the password for user@xxx.xx.xx.xxx When I ...
2
votes
2answers
43 views

copying from a remote server to my hdd with alias or reducing long file paths

I want to copy files from a remote server to my desktop and vice versa. However, the issue is, my files to be copied from the server have quite long file paths with at least 7-8 subfolders which are ...
1
vote
2answers
3k views

Bash script calls expect script with master SSH connection

I'm trying to write a bash script that calls an expect script to establish a master SSH connection to be used for the remaining SSH commands in the bash script. ~/.ssh/config: ControlMaster auto ...
1
vote
2answers
468 views

PHP exec expect script with SCP then SSH

I have a PHP page which runs the following expect script to upload a file to another server on my network: #!/usr/bin/expect -f set password [lindex $argv 0] spawn /usr/bin/scp /home/Dave/bin/test ...
1
vote
3answers
98 views

How do I iterate the list and copy the files from machineB and machineC efficiently?

I need to scp the files from machineB and machineC to machineA. I am running my below shell script from machineA. I have setup the ssh keys properly. If the files are not there in machineB, then it ...
6
votes
1answer
87 views

scp command working in bash doesn't work in zsh

This command works fine in bash: bash-3.2$ scp luna4:/u/paige/maye/src/diviner/notebooks/plots/hk_* . hk_az.png 100% 126KB 126.0KB/s 00:00 ...
2
votes
2answers
80 views

SCP files from machineB to machineA

I am trying to scp the files from machineB to machineA. I need to run the scp command from machineA to copy files from machineB to machineA. The file that I need to copy from machineB is - ...