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
0answers
20 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 ...
22
votes
4answers
94k 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
44 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 ...
1
vote
2answers
38 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 ...
61
votes
6answers
63k 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) ...
0
votes
1answer
1k 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
votes
0answers
21 views

redirect output of a looped shell script called by nohup

I want to transfer a number of files (in total, hundreds of gigabytes) from remote host using passwordless scp or rsync. The problem is that my connection breaks down easily so I decided to copy one ...
-2
votes
1answer
57 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
14k 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
44 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
28 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
18k 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
35 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
100 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
61 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
35 views

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

Actually the problem is that on the image bellow.
0
votes
3answers
60 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
55 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
63 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
93 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
160 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
49 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
52k 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
18 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
31 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
11k 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
55 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
40 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 ...
32
votes
4answers
63k 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
50 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
43 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
273 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
33 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
73 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
60 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
117 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
66 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
39k 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
164 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 ...
-1
votes
2answers
194 views

How to use scp and ssh command in a single script without any keys?

How to use scp and ssh command in a same script? First I have to copy one file from my local server to remote. Then from local server itself, I have to check the size of the copied file.
0
votes
0answers
38 views

Configuring a linux server for receiving Cisco IronPort logs via SCP

I am currently working on getting proxy logs from a IronPort via SCP to my Linux box. I have generated the authorized_keys file and put the public key in the file but I still get: Log Error: Push ...
3
votes
1answer
38 views

Expect to scp directory does not work when run from post commit

I am trying to implement a post-commit hook on svn which will scp some files from the svn machine to some other backup machine after each commit. I have written the script with expect as follows ...
1
vote
1answer
67 views

Concat all remotely distributed files in your cluster

I want to concatenate all abc_2015-12-15.txt files present on my cluster.Is there any best way to achieve this ? One way is to use below command across all nodes till all files concatenated :- ssh ...
19
votes
4answers
13k views

What's the difference between SFTP, SCP and FISH protocols?

I used to think SCP is a tool to copy files over SSH, and copying files over SSH is called SFTP, which is itself a synonym to FISH. But now as I was looking for a Total Commander plugin to do this in ...
10
votes
2answers
62k 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
1answer
159 views

scp with sshpass - remote directory and file with wildcards

I have a list with 950 MongoDB VMs I wish to collect all mongodb.log. The path to log file is depending on database name. for i in $(cat /tmp/mongonodes.txt) ; do sshpass -p34dDgdWger@rg4fll434ef ...
1
vote
2answers
484 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
66 views

Automatic and secure file transfer over two servers

the problem is how to automatically transfer backups from server A to server B in the best possible way in terms of security? Here is what comes to my mind: authorize server A pub key to access ...
1
vote
2answers
57 views

Permission denied scp'ing large file

I'm trying to copy a 4.5GB file to my Raspberry Pi: scp -r ~/firmware/ pi@192.168.2.8:/opt/ pi@192.168.2.8's password: scp: /opt//firmware/.DS_Store: Permission denied scp: /opt//firmware/.git: ...
0
votes
2answers
77 views

File Transfer from Unix to Windows network shared location

How can I move the files from unix path to windows network shared path and the file should be moved to respective folder in shared path and if not then it is to create a folder based on file name and ...