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
74 views

Download the file from either of two machines using SCP?

I have a below bash shell script which I am running from machineA and that shell script will try to download a tar file from either of these two machines machineB and machineC and put it in ...
1
vote
1answer
60 views

Putting two accounts in group not giving read access to group members

I have an Apache based web site and am trying to allow the user to upload files to a drop box on one machine and then have them transferred to another. So I form a group for two users: www-data which ...
1
vote
1answer
160 views

How to copy files within a remote server?

I would like to copy files in an remote server from one directory (in the remote server) to another (also in the same remote server). I tried this: scp -r myacc@remote.server:/folder_a/*myfiles* ...
1
vote
0answers
175 views

file transfer with SCP to Virtual Machine [closed]

I am trying to transfer files over to my virtual machine I tried the command scp files user@xxx.xx.xx.xxx:/home/user/directory I am later asked to enter the password for user@xxx.xx.xx.xxx When I ...
2
votes
2answers
46 views

copying from a remote server to my hdd with alias or reducing long file paths

I want to copy files from a remote server to my desktop and vice versa. However, the issue is, my files to be copied from the server have quite long file paths with at least 7-8 subfolders which are ...
1
vote
2answers
5k views

Bash script calls expect script with master SSH connection

I'm trying to write a bash script that calls an expect script to establish a master SSH connection to be used for the remaining SSH commands in the bash script. ~/.ssh/config: ControlMaster auto ...
1
vote
2answers
514 views

PHP exec expect script with SCP then SSH

I have a PHP page which runs the following expect script to upload a file to another server on my network: #!/usr/bin/expect -f set password [lindex $argv 0] spawn /usr/bin/scp /home/Dave/bin/test ...
1
vote
3answers
115 views

How do I iterate the list and copy the files from machineB and machineC efficiently?

I need to scp the files from machineB and machineC to machineA. I am running my below shell script from machineA. I have setup the ssh keys properly. If the files are not there in machineB, then it ...
6
votes
1answer
112 views

scp command working in bash doesn't work in zsh

This command works fine in bash: bash-3.2$ scp luna4:/u/paige/maye/src/diviner/notebooks/plots/hk_* . hk_az.png 100% 126KB 126.0KB/s 00:00 ...
2
votes
2answers
86 views

SCP files from machineB to machineA

I am trying to scp the files from machineB to machineA. I need to run the scp command from machineA to copy files from machineB to machineA. The file that I need to copy from machineB is - ...
0
votes
1answer
2k 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 ...
-2
votes
2answers
736 views

How to copy only the files of a folder(including subfolder's files), but not the folder itself in shell

In Openssh, On the client, the content of path/to/file must be copied to Server. All files in /path/to/file on the client must be copied to /path/to/files on the server. Note: only copy files, no ...
1
vote
4answers
166 views

Exclude characters for SCP-filepattern

Is there a way to build an expression for scp with which I can manage to copy the file file-name-version-1.2.1.jar without copying the files file-name-version-1.2.1-sources.jar ...
2
votes
3answers
205 views

How to compress and transfer folders from one server to another over network

Do we have any option to transfer folder from one server to another, that is faster and compressible and bandwidth limit settable method? The servers run on Linux. I tried tar + ssh but I couldn't ...
2
votes
2answers
390 views

scp does not display output when used with gnu parallel

I have a short script that uses scp to copy files to a number of remote hosts (yes, I know about rdist and rsync; they both fail to work for a few of the hosts - that's not the point here; I'm only ...
4
votes
1answer
581 views

Weird SSH/SCP progress meter behavior

I've got a very weird SSH behavior and it's making me a bit nervous. Basically the progress meter is totally bogus: so bogus that it's nearly useless. And I fear that there may be something else going ...
2
votes
3answers
501 views

scp and umask setting

How do i make SCP respect umask ? Ive tried adding this Subsystem sftp internal-sftp -u 0002 in /etc/ssh/sshd_config and session optional pam_umask.so umask=0002 in ...
0
votes
2answers
64 views

I'm trying to install my public key manually w/ scp

I'm following a tutorial and it's going along well. I used ssh to connect fine. Then I created a private and public key. Which leads me to my first question it says that the keys have been saved to ...
0
votes
1answer
67 views

Loss of .eps file quality after using scp to transfer from remote server

When I scp (secure copy protocol) a .eps image file (generated using IDL) from a remote server to my desktop, the image seems to be of a lowered resolution and "choppy". Strangely, when I transfer ...
3
votes
1answer
432 views

Rsync over ssh tunnel - using gateway server

Environment: ---------- ---------- /| ------------ | Work | | Gateway| | | | cluster | |Station |--------------------------------| ...
0
votes
1answer
2k views

Why does scp say “No such file”?

I have a bash script that uses scp to copy a file from my machine to another. The script keeps on exiting after I enter the SSH password with the error: <filename>: No such file or directory ...
4
votes
2answers
346 views

SCP file between 2 servers that go through few servers

I want to copy a file from server-a to server-d but I can access server-d only from server-b and then to server-c. server-a can only access server-b, server-b can only access server-c, server-c can ...
5
votes
2answers
453 views

How to disable the try again password in ssh command

I want the ssh command to only allow one chance in typing the password, if the password was wrong at the first time the ssh will return Permission denied (publickey......). Is there a flag that ...
0
votes
2answers
285 views

scp from remote host fails due to login greeting set in .bashrc [duplicate]

My simple file scp from a remote host (actually a locally run VM but that shouldn't matter) failed without displaying any error message but clearly not having copied the desired file: scp ...
2
votes
3answers
5k views

Copying files from one machine to another without asking for password

I am currently using this command. I am on another machine (ip1) scp file.txt root@ip2:/home/praveen/test.c /home/praveen The command will prompt for password. I use it in some shell scripts, and ...
4
votes
5answers
4k views

How to securely allow scp, but not ssh

I work from a Mac Book Pro (called foo). I have a server where my customers scp large files to. (called bar). I frequently ssh into bar, and scp a file (called buzz) to my Mac. bob@foo$ ssh bar ...
1
vote
1answer
150 views

Remote PC accessible by ssh, scp/rsync not working (anymore) [closed]

I've got a remote machine running Ubuntu 12.04 LTS. I've used it lots of times to log in to via ssh and to copy files to via scp and rsync. Today I was able to log in via ssh, but I'm not able to ...
1
vote
2answers
844 views

Bash function to scp a file not working

I am new to bash scripting and read basic tutorials online and wrote following simple bash function: function to_company() { scp ${1} username@long.server.name.company.com://home/username } ...
1
vote
2answers
284 views

errors trying to transfer via SCP [closed]

I'm trying to transfer a file between two servers and i'm getting different errors. Option 1: Logged at OLDSERVER via SSH scp file.tar.gz root@IPADDRESS:/var/www/. The error in this case is ...
4
votes
3answers
3k views

scp from one remote server to another remote server

I have one big file on server one and I want to copy it to server two using scp. I have the keys setup properly and I can ssh/scp to both servers from my desktop. The file I need to copy is larger ...
0
votes
1answer
1k views

scp stuck when trying to copy files from Linux to windows

I use the following scp syntax in order to transfer a lot of files from Linux red-hat 5 to windows machine (under Temp directory). SSH server is already installed on windows machine. I use this line ...
1
vote
1answer
233 views

Run command after nice command has finished

I have 3 nice commands that are dumping some databases, and compress assets for a backup. After that, the files should be copied to another server. I'm using this command: nice mysqldump -u user1 ...
4
votes
2answers
102 views

ssh to a specific machine within a network [duplicate]

I'm frequently transferring files and operating programs via ssh, and often from home. The machine I usually work on is a desktop at work that I cannot ssh to directly unless I'm already connected to ...
0
votes
0answers
21 views

file modified while doing scp/cp [duplicate]

I'm doing scp to a database while it's active. Its not very critical but I would like to know what will happen to a file when it is modified in the middle of a cp process? Does it get corrupted or it ...
1
vote
1answer
207 views

how to get Cisco IOS public key for automatic scp connection

I want to backup the running-config of all switches per SCP to a server. Question 1: is this possible with kron? Is there a better way and why? Question 2: how can I get the public key of the switch ...
1
vote
4answers
225 views

using scp command to transfer files keeping the same names intact?

Using scp command I want to move files from local system to a remote system. I'm doing something like this: $ scp file1 root@abc:root /root/tmp With this command I'm able to upload file1 to ...
2
votes
1answer
179 views

scp refuses to do anything but print usage

I'm trying to copy a file on my home network using scp. However, every time I run it, it just prints usage instructions. $ scp alex@192.168.0.4:ipdetect-0.6.tar.bz2 usage: scp [-12346BCpqrv] [-c ...
3
votes
1answer
158 views

Copy symlinks from ext3 to cifs share

I'm using scp to copy files from a Linux disk (ext3 file format) to a Windows disk (NTFS exposed using CIFS over the network). I've found that scp follows symbolic links and copies their contents ...
1
vote
2answers
2k 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?
2
votes
2answers
506 views

scp to /home changes permissions?

This would be illustrated very nicely with an scheme. When I write "Test: OK" or "Test: FAIL" I am restarting apache server (httpd service). Basically, performing everything as root in the ...
2
votes
1answer
193 views

ssh/scp works but rsync just constantly says “no”

Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised ...
0
votes
1answer
121 views

Indirect SCP connection

I use ssh and scp to connect to a remote server. Due to a ip/proxy limitation on the remote server, I have to connect first to another server. For example, if I want to connect to "SERVER-A", I have ...
2
votes
2answers
3k views

How to scp/tar files that are in between specific days?

I need to copy db log files between two suse servers where I am interested in files ONLY in between 10.3.2013 - 13.3.2013 It is desired to compress the files before copying so I tar them and scp. ...
0
votes
2answers
497 views

scp hangs on SSH2_MSG_SERVICE_ACCEPT received

I frequently scp my file to remote host. But suddenly it started taking more than 30 seconds to copy 20kb file.It used to take not more than half a second. After referring to some blog I appended ...
1
vote
1answer
340 views

scp recursively directories on SunOS

I have encountered a small issue with SCP (and also rsync). I need to copy certain files from server A (running SunOS 5.8) to server B (running SunOS 5.10). First, I get the list of files (several ...
9
votes
1answer
8k views

scp and compress at the same time, no intermediate save

What is the canonical way to: scp a file to a remote location compress the file in transit (tar or not, single file or whole folder, 7za or something else even more efficient) do the above without ...
2
votes
1answer
745 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
3answers
3k 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, ...
1
vote
5answers
3k views

Changing user while scp

I need to copy file between Linux machines. The problem that the user I use to login (myuser), is different from the user that can access the file. If I just ssh to the machine, I can switch the user ...
11
votes
4answers
3k views

Does a `scp` transfer close when I close the shell?

I have scp transfer (from one remote server to another), that is quite big. So maybe I want close the computer from which I executed this command, will this end the transfer? I have ssh access to ...