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
2answers
40 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
82 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
66 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
37 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 ...
14
votes
1answer
598 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 ...
8
votes
4answers
677 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
34 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 ...
3
votes
1answer
86 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
31 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
88 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 ...
2
votes
4answers
135 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 ...
17
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
31 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
38 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
26 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
79 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
159 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
460 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
31 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
47 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
75 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
27 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
179 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
75 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
243 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
53 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 ...
2
votes
4answers
425 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
42 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
80 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
82 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 ...
0
votes
1answer
155 views

SCP without password prompt using different username [duplicate]

I have 2 servers, Server1 and Server2. On Server1 I have a user named user1. On Server2 I have the user named user2. I need to be able to write a script that runs on Server1, which will scp some ...
2
votes
1answer
69 views

.bashrc custom secondary password and SCP is not working, (SSH secondary password)

For "some purpose" I have added a script in the ~/.bashrc to prompt for a secondary password and its serves my purpose. But, there is only one small issue is there. When I scp to the server, It fails ...
2
votes
0answers
50 views

Prevent scp from overwriting existing files?

Have been googling this for a while, and the problem is not so much of one where I trust my users to "do the right thing" and have them use rsync with various options to avoid overwriting files. I ...
0
votes
1answer
50 views

Hop scp and sshfs using ssh tunnels

Here's what I have: A desktop and a laptop both behind a firewall, both of which can connect to an ssh capable server. Here's what I can do: Create a tunnel from server to desktop by running this ...
1
vote
1answer
39 views

How do I transfer files over ssh and also change their permission on the remote server without having to log in twice

guy@home~% scp file.* guy@server.server.com:/users/guy/public_html/kool-stuff/ Ok so this transfers some files. Then I usually have to login in another terminal and do this in order to make them ...
0
votes
1answer
112 views

How to copy a file with scp via another server

I have three machines. The local machine L, Server1 A, Server2 B. L is able to connect to A A is able to connect to B L is not able to connect to B I want to copy a file from L to B without ...
2
votes
1answer
94 views

upload and dowload the files from server without giving password

I want to download the file from sever by using cron job, so I need to use scp command without giving password by keyword. How do I do so?
-3
votes
1answer
43 views

ssh tunel how to?

ok I have a following situation. machine1 , machine2 and laptop. I need ssh and scp protocol enabled such that I can access to machine1 and do some things there. also i cannot access to machine2 ...
1
vote
2answers
2k views

cp: cannot stat : No such file or directory

I am getting an error when I try to copy a file from my local computer to a remote server with ssh. I get the same error whether I use cp or scp. Here is my input at the resulting error: ...
0
votes
2answers
74 views

Using something like scp but when I've logged in already [duplicate]

I want to copy a file via ssh when I've logged in. What scp does is that it copies the files by login, password, path. What I want is to be able to do the same thing when I'm "inside", ideally without ...
1
vote
0answers
17 views

SFTP/SCP only and chroot [duplicate]

We have a SFTP Server and a bunch of users. The users share files over the SFTP Server with us (not the best solution, I know). Every user is chrooted into a different directory to prevent them from ...
1
vote
1answer
98 views

Copy directory with SCP

I'm trying to copy directory from local drive to remote server with -r parameter, however I'm getting: scp: System error: 1633648 (Failed to retrieve error string (err:317)) This is the syntax I ...
3
votes
1answer
212 views

Limit maximum number of concurrent scp processes running on a host

I am facing a problem where I have a fleet of servers which contain a lot of data. Each of the host runs many instances of a specific process p1, which makes several scp connections to other hosts in ...
1
vote
1answer
73 views

scp a file from one server to another one, got “permission denied”

source server IP 162.244.xxx.xxx file -rwxrwxr-x 1 user1 admin 36005278 Sep 10 2013 filename.tar at destination server scp user1@162.244.XXX.XXX:home/filename.tar ./ got a Permission ...
2
votes
1answer
266 views

Curl failed to read known_hosts file

I'm trying to download a file from a Centos 6 server using another Centos 6 server as client and curl with the scp protocol and I'm getting this error output: $ curl -v -O scp://cz/path/to/file * ...
1
vote
1answer
458 views

sftp command to get/download .tar.gz file

I thought I was familiar with sftp commands in unix and upto my knowledge the command to used to download a compressed file from the server is sftp get filename.tar.gz But when I tried this ...
4
votes
3answers
1k views

SCP command with selected file and directories for download ask's for password for each new file or directory

On my Fedora 20 system I use scp a lot, and this is the second time I encounter this, when I run this command: scp -r -P PORT user@host:/home/user/something/{file1,folder1,folder2,folder3,folder4} ...
2
votes
3answers
155 views

Copying a file using SSH over a tunnel with cert forwarding

I need to find a way to copy files from mymachine to a server priv-server sitting on a private NATted network via a server pub-server with a public IP. The behind-NAT machine priv-server only has ...
1
vote
5answers
313 views

Interactive ssh works, but not rsync or scp, on OSX

The motivation is that there's a server that I can ssh into (with or without key pairs set up ... i.e., without or with a password) but that I cannot send files to via rsync, scp, or sftp. Someone ...