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
17 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
33 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
3answers
6k 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
17 views

PSCP last 5min files from Unix to Windows [on hold]

I can copy files from Unix to my Windows machine using PSCP.exe: C:\PuTTY_Folder\PSCP.EXE -batch -p -pw password username@host:/dir1/dir2/*333444* C:\Folder\Folder2 I am copying files which have ...
5
votes
3answers
1k views

Transferring Files SSH SCP Error Message: 'Stdin: is not a tty'

I am using a Macbook SSH terminal and generated RSA key pairs and uploaded remote id_rsa.pub with approved permissions. I can connect with remote Apache web server. I can create, open, move, modify ...
2
votes
1answer
1k views

SCP and/or SSH command with password in line

First, I'm TRYING to use rsa keys because I'm using the script to create RSA keys, but initially I have to connect to the remote machine to pass over the newly generated authentication key. Having ...
0
votes
1answer
37 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
44 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
50 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
34 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
31 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
71 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
35 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
47 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, ...
1
vote
1answer
116 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 ...
6
votes
4answers
3k 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 ...
0
votes
2answers
44 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
88 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 ...
8
votes
1answer
4k views

Command-line mv exclusion list

Is there a way to mv,cp, or any file operation such that I could specify all the files I don't want affected? For example, say I have a folder with the files file1, file2, and file3, and I want to ...
8
votes
4answers
1k 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?
15
votes
1answer
625 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 ...
2
votes
1answer
47 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 ...
0
votes
2answers
70 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.
0
votes
2answers
38 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 ...
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 ...
3
votes
1answer
112 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
36 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
125 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 ...
4
votes
6answers
30k 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 ...
2
votes
4answers
175 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 ...
0
votes
2answers
281 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
1answer
42 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
52 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
117 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
1k 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
589 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 ...
3
votes
4answers
3k views

Suppress server message in rsync

When I rsync or scp from a particular server I get a rather long message telling me the rules of the server. However when I setup regular pulls, I'd like to be able to suppress those messages in my ...
2
votes
4answers
5k views

How to scp with regular expressions

I'm trying to copy all files that do not begin with the letter "a", in ksh. Copying from the source machine to destination machine is working fine: scp -p !(a*) user@machine:/path/directory/. But, ...
2
votes
1answer
39 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
52 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
96 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
36 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 ...
1
vote
2answers
100 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
546 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
58 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
1k 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
68 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
92 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 ...
19
votes
2answers
6k views

Do you need a shell for SCP?

I'm allowing a friend a local account on my machine, exclusively for SCP. Can I specify his account's shell as /bin/true, or in any other way limit the account, while still allowing SCP?