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
2answers
811 views

Scp command over ssh without password in script

Here is my problem: I would like to perform scp command after ssh to remote server without typing any passwords. I describe my steps. My first steps were: ssh-keygen -t rsa and local@host$ ...
1
vote
2answers
41 views

Get `scp path/` behave like `rsync path/`

I have local file structure: /tmp/24 /dir1 /file1 /file2 /dir2 /file3 /file4 and I want to upload it to remote compute. When I use rsync /tmp/24 host:/...
1
vote
0answers
34 views

password fails over ssh, works locally

This weekend I really dove into unix and got a Arch installed on an old computer and got it to serve my website. So I'm a bit of a noob. Today I went to copy a database file from my Mac laptop to my ...
0
votes
0answers
34 views

SCP demanding password for root

I configured (successfully I hope) a client and a server on OpenWRT (SSH), now I'm trying to use scp to put a file on a server from the client, but it doesn't work because it wants me to give a ...
0
votes
2answers
28 views

SCP command keeps asking password

I've been struggling for days with this now and can't find what I'm doing wrong. I've got a website on a VPS server. Every night I make a backup of the database. It gets stored on my VPS server. I ...
3
votes
3answers
13k 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 ...
4
votes
4answers
3k views

scp and umask setting

How do I make SCP respect umask ? I've tried adding this Subsystem sftp internal-sftp -u 0002 in /etc/ssh/sshd_config and session optional pam_umask.so umask=0002 in /etc/pam.d/...
5
votes
2answers
17 views

Can you scp, sftp, or rsync, a pipe?

I want to tar and send a ~700GiB directory to a remote drive I don't control. I don't have the HDD space locally to create the tarball and then copy that over. The remote is also protected by rssh - ...
2
votes
1answer
55 views

why rsync does not do delta transfer

I have binary file which has approx 77MB: nupic@nupic-virtualbox:~/VboxSharedFolder/experiments/sync/exp2$ ls -lah src/ total 77M drwxrwx--- 1 root vboxsf 0 Jun 21 13:31 . drwxrwx--- 1 root vboxsf ...
0
votes
1answer
2k 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
1answer
24 views

Difference in ssh/scp host resolving and network reachability

I've got a virtual machine running on KVM on my localhost. I can ssh into it without problems using hostname (entered in /etc/hosts) or the IP address. With: scp root@remote:/somefile root@localvm:/...
-3
votes
3answers
62 views

My NIC speed is 1g per second why scp speed is 120MB per second

My Network Interface card r/w rate is 1000MB/S, but when I scp one file it shows the copy speed is 120MB/S. such as: scp test.gz localhost:/data/test.gz
2
votes
1answer
141 views

specify shell for ssh session

I am logging to a remote server via ssh as user www-data. User www-data on the server has his default shell set to /bin/sh, and when I log in, I get dash as my shell. I can then type bash and get bash ...
0
votes
1answer
86 views

SSHFS fails, Error - read: Connection reset by peer

SCP is working, but the sshfs is displaying the above error. sudo sshfs -o allow_other -o transform_symlinks username@192.168.2.207:/ /media/SSHFS_bbb
2
votes
2answers
49 views

Slow scp transfer speed over wan

I have got a 300mbit symmetrical fiberoptic line, and I have got to transfer a 51MBYTE tar file from HOST A (fiberoptic 300mbit) to HOST B (digitalocean machine with more than gigabit bandwith). On ...
-1
votes
1answer
22 views

Having hard time getting my public key to work

I'm using scp to send from a shared Hostgator site to Adrive's scp server. I created a private and public key with puttygen.exe. First time, I put in my password for the passphrase. Second time, I ...
4
votes
2answers
192 views

SSH broken pipe, message authentication code incorrect

I have set up a Ubuntu server that I plan on using to backup my macbook air using rsync. But every time I use rsync, or even scp, the connection drops, with one of the following errors: ...
2
votes
1answer
38 views

SCP selectively from directory and subdirectory

I don't know if this possible but I wanted to check with all UNIX geeks here. We have a directory structure as follows: Subject_11 -subdir01 -subdir02 -subdir03 -subdir04 Now I want to scp ...
0
votes
2answers
41 views

Unable to SCP to another IP

I am attempting to scp some files from one IP address to another. I entered the command: $ scp file baileyd@*IP*:/home/baileyd/doc and got the response: ssh: connect to host *IP* port 22: No route to ...
2
votes
5answers
72 views

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

I have a directory that I want to move (with its contents, recursively) 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 ...
13
votes
3answers
21k views

SCP from one server to another without password prompt

What is the best way of doing scp from one box to the other without prompting for password? There are two servers: Server A (10.152.2.10): /home/oracle/export/files.txt Server B (10.152.2.11): /...
13
votes
3answers
87k 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 ...
1
vote
2answers
778 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
50 views

Transfer Size limit for SCP, SFTP, RSYNC?

Is there a maximum size limit to the size of collective size of the files that are to be transferred in one go for the above protocol. My intent is to know if for example after 1 GB any of these ...
1
vote
0answers
51 views

scp and rsync not working when executed within .sh files from “startup programs window”

With Ubuntu Mate 16.04, I have a file my_backup.sh like this: # Log just for trying echo $(date) >> /home/albert/dia_hora # BBDD NOW=$(date --date="yesterday" +"%d") FILE="...
1
vote
2answers
90 views

Unable to scp in Jenkins

I'm a new user of Jenkins.I'm trying to run a shell script as part of the build step in Jenkins. This script has a scp command which transfers a .tar file to a remote server. Although when I run this ...
4
votes
3answers
8k views

How can I scp a file that my user can't read but I can sudo?

Can I use scp to copy a file from a remote server which my login user can't read, but where I have permission to sudo to root (without password even)? How?
5
votes
3answers
3k 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 ...
10
votes
5answers
5k 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
2answers
2k 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 ...
0
votes
2answers
35 views

How can I scp using a “do until loop”?

This scp command fails nearly daily: scp myfile root@xx.xx.xx.xx:/myhome Sometimes, I have to do it 2-3 times as it does not make the network connection off and on. How can I put this into a loop, ...
1
vote
0answers
32 views

PSCP - why can't it find the file when using non-admin credentials?

I am trying to make a batch script to get files from Windows vm to Ubuntu vm so I decided to use pscp. when I put pscp -l admin -pw pswd C:\path admin@IP:/path the files transfer fine but I don't ...
25
votes
4answers
100k views

Error using SCP: “not a regular file”

I have been searching for a while and I can't find the definition of a regular file. My path is permanent (I start at /) and I am connecting to scp root@IP: /path/to/picture.jpg Results in an ...
1
vote
2answers
76 views

Why does SCP fail when “RequestTTY force” option is enabled?

In my SSH config file, I have to enable the RequestTTY force for some important reasons. And currently my config file looks like this: Host x.x.x.x HostName yyyy StrictHostKeyChecking no ...
2
votes
2answers
44 views

SSH to a remote Machine using a different Local ID

I need help related to SSH. Let me explain a scenario. I am logged in as "user1". Host A: user1 user2 Host B: remoteuser. There is a trust relationship setup between user2 on Host A and ...
68
votes
6answers
68k views

scp without replacing existing files in the destination

How do I copy an entire directory into a directory of the same name without replacing the content in the destination directory? (instead, I would like to add to the contents of the destination folder)
-2
votes
1answer
62 views

list of directories into comma separated directories [closed]

Hi I am trying to do scp copy of directories from one environment to another environment. Suppose directories at location \ as dir1 dir2 dir3 and so on. Now as the scp copy I need to list these as {'...
1
vote
5answers
17k 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 ...
2
votes
0answers
49 views

Prevent scp and less commands reading interactive tcsh script

I'm using tsch through PuTTY, and let's start by this: please don't try to convince me to migrate to another shell...:) It's being a long time that commands like scp and less didn't work well for me. ...
2
votes
2answers
20k 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 ...
0
votes
0answers
96 views

How to Copy Files through Socks 5 Proxy?

I'm trying to copy files from ubuntu server A to debian server B. Accessing both of them via SSH on win7 laptop C. Because of slow transfers the company running A provided a Socks5 proxy. Now when ...
3
votes
4answers
137 views

How to execute multiple commands remotely on few servers?

I am trying to automate these steps so that I don't need to do this on every machines manually. I need to install latest app server software (abc.tar.gz) on all the unix boxes. I need to do this in ...
-2
votes
2answers
62 views

How to copy one directory to a group of servers

I need to copy a directory to different servers, which are listed in a text file (hostfile). I haven't found any way to do something like this with scp scp -r --hostfile ~/directory to_all@servers:~/...
-3
votes
3answers
38 views

unable to scp a file with a space in name [duplicate]

Actually the problem is that on the image bellow.
0
votes
3answers
90 views

How to copy a folder from remote using remote user with sudo? [duplicate]

How to copy a folder from remote using remote user with sudo? None of these works on folders with permissions and fails with permission denied: scp -r userwithsudo@XX.XX.XX.XX:/source/ /destination/ ...
3
votes
1answer
99 views

How to NOT preserve permission when using scp

I am trying to copy data to one of my servers. Some of the files that are copied have permission 444 on the source machine. This is very annoying, since if the transfer gets interrupted while one of ...
-1
votes
3answers
77 views

scp a file to multiple folders

I wanted to scp file.txt to remote box my-remote-vm-1 In my-remote-vm-1 there are two folders conf-1-ver-2,conf-2-ver-2. The integer part in the folder name can go from [0-9]. What would be the best ...
3
votes
3answers
131 views

Transfering files via ssh but without scp or sftp

I need to transfer files via ssh, but unfortunately scp and sftp are not viable, as the host I am connecting is just a "door" node that is redirecting me to a different machine available only on a ...
3
votes
2answers
165 views

Why the defined path is used as file name when I transfer files through scp to a Windows host?

When trying to copy a file from Linux (Raspbian to be precise, though I don't think it matters) to Windows using SCP: scp a.txt {user}@{ip}:\C\Users\{user}\a.txt The file is copied, but to C:\Users\...
5
votes
7answers
56k 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 scp/...