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

13
votes
3answers
20k 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): ...
11
votes
3answers
72k 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 ...
0
votes
0answers
23 views

How to send and receive files through given channel by scp in putty [on hold]

Suppose we have Putty and some bash-script on the remote cluster. First I send the file from my machine through putty. Once the file is received by cluster, the script starts to run. It generates some ...
1
vote
2answers
760 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
38 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 ...
0
votes
0answers
41 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") ...
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 ...
1
vote
2answers
55 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
31 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
28 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 ...
23
votes
4answers
97k 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
59 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
42 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 ...
63
votes
6answers
65k 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
61 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
16k 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
47 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. ...
0
votes
0answers
38 views

rsync and scp hang inside the bash script but run at the command line

I'm trying to execute scp and rsync commands inside of a bash script. The following happens when I run the bash script: scp -o StrictHostKeyChecking=no /tmp/foo 'user@xxx.xx.xx.xxx:/tmp/foo' ...
2
votes
2answers
19k 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
62 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
122 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 ...
-3
votes
3answers
37 views

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

Actually the problem is that on the image bellow.
0
votes
3answers
74 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
70 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
72 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
110 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
161 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 ...
0
votes
0answers
66 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 Found the solution - host key is changed, Need ...
5
votes
7answers
54k 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 ...
1
vote
1answer
22 views

tmux check interfering with scp usage

My .bashrc file on my server is relatively simple, but it has this chunk to ensure that it automatically connects to tmux on login: echo Checking for tmux if [ -z ${TMUX} ] then /usr/bin/tmux ...
1
vote
0answers
38 views

scp to a KVM guest behind NAT

I have a KVM guest running on a server accessing it via virt-manager. I'm running the guest from my_pc. server has a public IP address and both my_pc and guest can ssh it. guest has a 168.192.x.x IP ...
14
votes
4answers
12k 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
1answer
66 views

Screen/system hangs when using scp or rsync + ssh in local network

First, I noticed frequent hang ups with the mouse when using scp in local network. I checked RAM usage, but free -m showed me about 33% usage without buffers/caches. (I have 8G RAM.) The CPU usage was ...
4
votes
4answers
44 views

Transferring files to someone else via sftp

This is probably a dumb question, but the Internet wasn't very helpful... Someone else is giving me a dataset that is too large to send via email, Dropbox, etc., so I'm thinking we can use sftp or ...
33
votes
4answers
66k views

How to get full path of original file of a soft symbolic link?

I want to scp a file to a server. The file is a symbolic link, and actually what I want to do is copying the source file. Anyway I don't want to track source file's path manually, because it can be ...
1
vote
1answer
54 views

How to write a file a file via ssh

I want to write a file in the Machine B under /home/test whose permissions are root:root and rwxr-xr-x. I have an account on the Machine B, named testUser. When logged to the Machine B with ...
0
votes
2answers
45 views

Allow null password for file transfer from Sunsolaris machine to linux mchine?

I m trying to pull a file from a Solaris server to my Linux server and I did it successfully by using scp.I want to run this below command as a cronjob, How can I save password for this automation ...
2
votes
2answers
299 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 ...
1
vote
1answer
45 views

Push/Pull files among Unix machines with private key on Windows

I am operating across three systems: A remote Unix machine (let's call it Unix1), which stores some files A local Windows machine (let's call it win1), which stores the private key to Unix1 A ...
4
votes
1answer
76 views

Prevent processing file until SCP transfer is finished

Large files are transferred to a server for processing. The server monitors a specific directory using incrond and when a new file is received the processing script is executed for that file. Because ...
1
vote
2answers
65 views

How can I save password,when copy a file using SCP?

I am new in here. I am facing problem when I pull a file from another machine to my machine using SCP. File is successfully transferred but each time it asks for password. I want to run this SCP ...
1
vote
1answer
153 views

Fastest file copying within sshfs directory (rsync?)

I have a directory on a remote server remote1, mounted via sshfs. I am installing new versions of some of the files in the remote directory, which are quite large (~50M). I am currently using ...
0
votes
2answers
78 views

scp requirements for batch mode

I'm launching a script from a Jenkins server (on RHEL6) that, among other things, uses SCP with "BatchMode yes" to copy a file from a remote machine. The script runs properly outside of Jenkins, but ...
7
votes
5answers
43k 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 ...
2
votes
3answers
221 views

Do I need to check for file corruption once scp is done?

I have recursively transferred many files and folders with scp, using the command: scp -rp /source/folder myremoteusername@122.10.12.123:/destination/folder After the transfer is completed, do I ...