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

0
votes
1answer
11 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 ...
1
vote
3answers
37 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 ...
1
vote
0answers
22 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 ...
0
votes
1answer
36 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
28 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
40 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
46 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
24 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 ...
0
votes
0answers
106 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 ...
2
votes
0answers
83 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
54 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 ...
0
votes
0answers
9 views

csp where both source and destination are local or how to make cp show a progress bar [duplicate]

csp shows a nice progress bar when copying a file to/from a remote host. Since cp doesn't have such a nicety, it ocurred to me that I could use scp to copy files in the same machine (no remote host), ...
11
votes
3answers
592 views

What does the `-C` flag exactly do in `scp`?

I always use either rsync or scp in order to copy file from/to a remote machine. Recently, I discovered in the manual of scp (man scp) the flag -C -C Compression enable. Passes the -C flag to ...
1
vote
1answer
21 views

What happens to my files if I scp-ed to non existing directory

Here's what I did: copied some files from server to my local computer scp root@remotemachine:/var/log/nginx/* /home/me/logs deleted the files on the server The next moment I realized, that I ...
1
vote
0answers
16 views

Fedora 22 - Question SCP [closed]

I am sending a photo file to myself just to another folder below. http://postimg.org/image/xo626zegz/ When I try to send to another machine gives an error as can be seen below. ...
0
votes
1answer
55 views

Cant use scp with wdmycloud

I can successfully log in to mycloud as root or another user I added. I need to use the scp command to send an image to my folder. It keeps asking for the password and saying its wrong when I know ...
0
votes
1answer
91 views

How to copy files from one remote server to another (LFTP)

Disclaimer: I have little Linux/sysadmin experience. I am trying to transfer some files to someone else's remote server. The source files are available on my local Windows machine or our own remote ...
1
vote
3answers
96 views

Why does my scp cap at 8MB over local network transfers?

Is there a reason scp caps at around 8MB when transferring files from one computer to another, over a local network? I'm transferring a couple hundred GB of data (movies and such), and have ran the ...
0
votes
2answers
64 views

scp not working without password

I created keys so I can transfer files and run commands without having to enter in a password. I used this guide to do it: ...
1
vote
2answers
101 views

How do I scp a file from server A to server B from cron?

I have a file in server A which I am able to do transfer to server B using scp. I need to do this through a cron entry. server B has a password. How do I perform this?
1
vote
1answer
82 views

How to discriminate between SSH and SCP for QoS in OpenWRT (and other systems)?

I regularly upload large amounts of data using SCP through my DSL upstream connection, which is limited to 1kbit/s. While I really want interactive SSH sessions to have highest priority, simply ...
2
votes
2answers
85 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 ...
2
votes
1answer
33 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 deny when I try to scp. I have the correct group as a secondary ...
0
votes
2answers
58 views

Script works without sudo, fails with sudo

When I launch this script: #!/bin/bash -v sshpass -p '<pypasswd>' scp blah.img root@myip:/home/user/blah.img exit 0 with ./script.sh or nohup ./script.sh & it works. But when I do ...
1
vote
1answer
52 views

Upload from shell to HTTP Server

I use scp command to upload file from my local computer to my ftp server is there any tools to do the same thing with http server (like Apache server ) like scp do ?
0
votes
1answer
72 views

Disable scp for all IP, but allow it for given ones

There is a server running sshd. We have root permission on it. Question: How can we disable SCP on it, BUT: allow a given IP to SCP (copy to it, etc.) Maybe rename the SCP binary and have a "Match ...
-2
votes
1answer
32 views

How to Upload To vsftpd default dir with scp

I have been working on uploading from shell and I need to upload from shell I found scp in openssh-client . and it work perfectly but in this command I have to set destination path in ftp server like ...
0
votes
0answers
51 views

scp from a remote machine

I am having trouble moving files off a remote machine that we need to take down. I can SSH into the remote machine just fine but, when I try to scp the files out I get an connection timed out on port ...
1
vote
3answers
72 views

How to scp all files of a certain owner?

I want to scp all files of certain owners. For example, if this is my ls -la output: -rw-rw-r-- 1 owner1 ad 704 Jun 1 18:16 file1 -rw-rw-r-- 1 owner2 ad 798 May 29 11:15 file2 -rw-rw-r-- 1 ...
0
votes
1answer
100 views

Sending files over Samba with command line

I was wondering if there is a way to use Samba to send items to a client machine via the command line (I need to send the files from the Samba server). I know I could always use scp but first I was ...
2
votes
2answers
157 views

Copying latest file from remote server

There is a collection of .doc files, in addition to other types of files, on a remote server (which supports SCP). I am trying to write a script to retrieve the latest (most recently modified) .doc ...
0
votes
1answer
69 views

help with remote file find/scp

I have a set of files on a remote sftp which I need to download to a server every day. sftp uses ssh keys to authenticate, so I created a ssh key and added to the remote server authorized folder. I'm ...
3
votes
2answers
50 views

Is it possible to have a lag between scp and checking for new file

Got a cronjob that downloads things regularly: if ! su scpuser -c "scp ..." > /dev/null 2>&1 || ! [ -f $scptarget ]; then; error "did not download stuff" $scptarget is where the thing ...
-2
votes
2answers
208 views

SCP and delete a files from source

I Have a list file File_Transfer_List.txt which contains list of file to do scp My requirement is I need to do scp that files given in the list file and then delete the files from source location. ...
2
votes
1answer
53 views

How to rsync only a specific list of files to the same location on another server

I have a list of files: /location/file.txt Content of file: /location1/file2.abc /location2/location3/file1.abc /location4/location5/fileX.cde I'd like to copy files to another sever like this: ...
0
votes
3answers
47 views

How do I upload more than one files to a server and keep their directory structure with scp?

I have some local files at: /doc/dir-monkey/monkey.txt /doc/dir-monkey/monkey.xml /doc/dir-dog/dog.txt /doc/dir-dog/dog.xml /doc/dir-cat/cat.txt /doc/dir-cat/cat.xml Now I want to upload them to ...
0
votes
0answers
106 views

SCP won't copy files due to output in .bashrc

I just uploaded my linux (mint to v. 17.1), and now I cannot upload files to a cluster via scp anymore. I understand that .bashrc cannot output anything during the process for it confuses scp, so when ...
1
vote
2answers
55 views

Read the file from one Unix server to the other Unix server

I have a Pro*C program which I run on Unix server a but the input file required for this program is on other Unix server b. Whenever I run I have to copy the file from server b to a. Is there any way ...
1
vote
1answer
92 views

Tar and download in one step over ssh / scp [duplicate]

(This seems like an obvious / common question, but I couldn't find it when searching - maybe I wasn't using the correct terminology...) I want to login over ssh to a remote machine, tar a directory, ...
0
votes
2answers
63 views

How to copy files from other servers if local machine is down

I have a script which will be running in each server and copies certain files into it. Script knows where I am running and what files I need to copy. Script will copy files from local datacenter ...
4
votes
2answers
105 views

How to copy files from local datacenter to local datacenter and have some failover cases?

I have a script which knows about on which HOSTNAME it will be running as it has the HOSTNAME variable which tells about this and it is being passed from outside. I want to check which datacenter that ...
1
vote
1answer
255 views

bash scripting : using expect

I am facing an issue when I run simply these commands. The remote server want to pass "yes" to add the key in RSA file because first time connection established with scp. commands are given below ...
2
votes
1answer
106 views

Why does scp not show true upload speed?

Every time I'm trying to upload a file using scp on my slow upload connection (~100kb/s), it shows something like : test 27% 2208KB 2.2MB/s 00:02 ETA On the first ...
15
votes
1answer
779 views

Transfer a file over a unstable SSH connection

I'm trying to upload some big files (around 10GB) with a slow upload speed (200kb/s) on a often disconnected SSH connection (due to poor network conditions). I'm trying to use scp, but if there is a ...
10
votes
4answers
4k views

Can scp create a directory if it doesn't exist?

I want to use scp to upload files but sometimes the target directory may not exist. Is it possible to create the folder automatically? If so, how? If not, what alternative way can I try?
0
votes
2answers
61 views

How can I transfer a file across 2 servers (source->serverA->serverB) with a single script.

I have 3 linux servers - the first one is a dev machine (where I compile my binary), the second one is a "jumpbox" which helps me connect to a "testbed" - which is the place where I need to copy my ...
4
votes
1answer
166 views

scp command fails executing cp

I am trying to use scp command to copy the r0.res file from local machine to a remote machine. I entered the following command: scp -v /etc/drbd.d/r0.res root@192.168.1.104 and I obtain this error: ...
-1
votes
1answer
76 views

Transfer executable file from Linux to mac

I have a file that is sitting on my server, this file is an executable file on the server. When I just use SCP to copy it down to my desktop which is a mac i get bash - ./fig up cannot execute binary ...
0
votes
0answers
311 views

SCP stopped working: Permission denied, please try again

I was using scp to transfer files from server A to B (both CentOS with WHM and their usernames are equal). nohup scp -rpC xaa2 username@serverIPB:xaa2 I did it many times and then, suddenly, it ...
1
vote
5answers
391 views

Can't do an SCP pull despite SSH working fine

I have setup key authentication between two servers and I can ssh in without a key, for example: ssh backup@hostname this works fine and logs me in. But when I try an SCP to pull a file, I get no ...