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

1
vote
1answer
16 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
55 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
20 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
37 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
28 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
49 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
20 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
48 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
62 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
59 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
69 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
47 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
47 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
76 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
44 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
39 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
82 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
38 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
60 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
51 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
93 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
159 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
75 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
668 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 ...
9
votes
4answers
2k 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
46 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
143 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
47 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
191 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
259 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 ...
18
votes
3answers
2k views

Transfering large (8 GB) files over ssh

I tried it with SCP, but it says "Negative file size". >scp matlab.iso xxx@xxx:/matlab.iso matlab.iso: Negative file size Also tried using SFTP, worked fine until 2 GB of the file had ...
1
vote
1answer
57 views

Can you scp a device file?

My flash is partitioned as /dev/mtd0 /dev/mtd1 etc....And I want to scp one of the partitions over to my pc so I can analyze it with a hex editor, but everytime I try to copy it with scp I get -not a ...
0
votes
0answers
67 views

Slow scp transfers over VPN from home network

I am trying to help out a friend that has been having issues with a IPSec VNP and scp. Allow me to describe the problem: When he connects to the IPSec VPN from a University, Starbucks, etc, he can ...
0
votes
1answer
27 views

Generate SCP string

Generally when I am copying files from a local instance to a server, I find it difficult to generate the SCP string for the server to copy the files. I need to execute the following three commands ...
2
votes
1answer
178 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 ...
0
votes
1answer
3k 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 ...
8
votes
1answer
724 views

mkdir: cannot create directory: Function not implemented

I am in college and have to submit my cs homework from a school Linux machine, but I like doing the homework on my laptop (Mac). So instead of copying my files over every time, then submitting them, I ...
2
votes
1answer
42 views

File transfers with SSH and switch-user

Have a situation that SCP and SFTP wouldn't work for. I've RTFM for SSH, but can't find what I'm looking for. The scenario is that in order to transfer files to the server, I first SCP them into a ...
1
vote
0answers
70 views

scp stdin: is not a tty, and write failed, connection reset by peer

I have used scp for years between linux servers, as well as with Mac OSX systems. But now, I have installed cygwin and ssh, bash and openssl in order to pull large files from my linux box on the web ...
2
votes
2answers
136 views

Move file to another user's home directory (without sudo)?

I have a couple of files that I want to move to another's user home directory. I don't have permissions to write to that user's home directory, but I know his password. I know how to copy the file ...
0
votes
1answer
44 views

size differenring after scp from one machine to another

I have a file size of 7.5Gb which I transferred from one solaris machine to another solaris machine through scp. after scp the file is showing 13Gb in destination server.I would like to know what's ...
0
votes
2answers
376 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 ...
1
vote
2answers
130 views

Copy files to multiple computers over LAN

Good day, I am pretty new to Unix and I need to do this simple task. I have a few files, let's name them file01, file02, file03 etc. and I need to copy each of them to one computer from a list. The ...
1
vote
1answer
860 views

How to pipe scp/ssh file transfer(pull) through tar (remote->local transfer initiated from local machine)

I would like to pipe an scp pull operation(sample without tar below) through tar, so that only one tar file is written for about 10 directories: user@localhost:/home/user> scp -r ...
3
votes
2answers
71 views

Seeing file names in SCP

I'm using scp to copy files from a remote server to a local one. What's really uncomfortable is that I need to type the file path precisely. I'm used to relying on autocompletion, because file names ...
3
votes
4answers
4k 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 ...
0
votes
1answer
91 views

scp between 2 remote hosts using key auth

I want to copy files using scp between two remote hosts with key-based authentication. scp -i /home/user/.ssh/id_rsa user@host1:/tmp/myfile user@host2:/tmp/ The problem is that the host2 still ...
3
votes
3answers
104 views

Write bash function which operates on list of filenames

I want to define the function cpfromserver in bash so that when I run $ cpfromserver xxx yyy zzz the result is the same as if I had typed $ scp user@remote.server:"/some/location/xxx/xxx.txt ...
0
votes
0answers
10 views

How to force scp to connect via a active socks proxy? [duplicate]

I want to upload files with scp but from a given socks5 proxy (say it's 127.0.0.1:8000). What should I do? Is it possible to just add some parameters to scp? Thanks
0
votes
1answer
144 views

SCP from remote to local does not work

I can scp just fine from local to remote by doing: scp trip3.csv pi@192.168.2.11:/home/pi/ But when I try to do remote to local (below) it says no such file or directory: scp ...