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

how to find out the ip of an ssh HostName

Is there a simple way to retrieve the IP of a HostName from an ssh config on the command line? Many times I have to use scp and would like to connect to a machine, but I remember only the HostName.
5
votes
2answers
237 views

Provide user name when using vim with scp

I was reading about SSH here http://blogs.perl.org/users/smylers/2011/08/ssh-productivity-tips.html and found that you can use vim to directly modify a file on a remote server that you can ssh into. ...
5
votes
0answers
201 views

Copy file over existing SSH session? [duplicate]

Possible Duplicate: SSH easily copy file to local system Let's give the following example: I've connected to ssh user@myserver.com. I need to copy a local file over to the remote ...
5
votes
2answers
2k views

Provide parameters to scp with xargs

When I run svn st | awk '{print $2}', I get: a.py b.py c.py Then I want to scp these files to a remote server. I have tried: svn st | awk '{print $2}' | xargs scp my_name@my_server:~/ But it ...
0
votes
1answer
805 views

Are there any “scp -p” just like “cp -p”

So if I need to preserve the permissions/user/group infos of files then I can copy them with "cp -p foo fooo". But are there any "preserving" options in scp? When copying between servers.
3
votes
3answers
1k views

SCP works, but SSH doesn't (over wifi)

As the title says, when I'm using wifi at my office, I'm able to copy files to and from my server using SCP, but for some reason SSH is non-responsive. It just hangs, doesn't print anything, and I ...
3
votes
3answers
10k views

How to pull a file from a server using scp?

I am on machine A and want to pull a file from machine B. A$ scp <myuserid>@hostB:<path of file in B> . it says that: scp: <path of file in B>: No such file or directory But on ...
11
votes
3answers
18k 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 ...
0
votes
3answers
4k views

How to copy files from linux to windows using winscp from a folder which contains millions of files

I need to copy files from a linux machine to a windows machine where the only ports which can be open are for SSH (22). I can connect to the linux machine using WinSCP but the problem is once I try to ...
4
votes
2answers
7k views

“Permission denied, try again” while transferring files with scp

I have two servers (A and B) and my local machine. I'm trying to transfer a file from server A to server B. From server A: scp ./backup.tar user@server.b:/home/public/ Permission denied, please try ...
8
votes
2answers
5k views

SCP fails without error

I've been experiencing very strange behavior of SCP for some time: whenever I try to copy a file, the output of SCP contains a bunch of underscores and the file is not copied. $ scp test.txt ...
1
vote
1answer
456 views

Copy/Backup all files except the most recent through scp

I have a program that is running on multiple machines and which is writing the results to ~/data/machine_name/, each time the results file exceeds 1MB the program moves on and write to a new file. ...
2
votes
2answers
3k views

How to make scp respect umask

My scp doesn't respect umask setting of the user it's sending files to. Is there a setting somewhere or should I use a different solution?
3
votes
2answers
8k views

Permissions “problem” using SCP to copy to root owned folder from local

I'm taking some early forays into setting up a basic LAMP box. It's my first time setting up the software I'll use as opposed to just being handed a working environment, so go easy on me :) I have ...
3
votes
2answers
937 views

Copy files from remote server to local, ignoring existing files (rsync not available)

I would like to copy a directory of files from a remote server. As it is a large number of files, the option of ignoring existing files on the destination server is desirable. Unfortunately, rsync is ...
2
votes
2answers
2k views

How to scp from server to server with different public keys?

What arguments would I use for the scp command on a server to server copy if the two servers need different ssh keys? I know how to scp files from a server to a server without having data flow on the ...
1
vote
2answers
385 views

scp hardlocking my server (both ways)

I have this strange issue. scp is hard locking my server. I have tried memcheck, tried downloading big files using wget, tried speed test in openssl and everything works just fine, yet every time I ...
8
votes
2answers
3k views

User can't touch -t

When SCP'ing to my Fedora server, a user keeps getting errors about not being able to modify file timestamps ("set time: operation not permitted"). The user is not the owner of the file, but we cannot ...
1
vote
1answer
408 views

Need command-line program to download all of http:// https:// scp:// ftp:// style links (on e.g. ubuntu)

I'm writing a perl program where I want to accept all kinds of "file names" from the user, including /home/foo/bar.txt and scp://server/some/file.txt or whatever. And then I thought that if I can find ...
4
votes
2answers
4k views

Output progess of the scp/sftp command to both standard out and a file on linux server

I am writing a release script, which uses scp/sftp to get the the file from a remote server, we want to log the output of this script to a release.log file as well. I am using "tee" to achieve this, ...
5
votes
1answer
2k views

how to scp in mc (and remember)?

I found that I can do scp in mc via cd /#sh:radek@firebird from the command line. Is there any way I can save this as a favorite? Maybe even with the password?
8
votes
5answers
7k views

Why does SCP hang on copying files larger than 1405 bytes?

I'm trying to copy a file from one of my local machines to a remote machine. Copying a file with size upto 1405 bytes works fine. When I try to scp a larger file, the file gets copied but the scp ...
19
votes
5answers
8k views

How can I best copy large numbers of small files over scp?

I have a directory that's got several gigabytes and several thousand small files. I want to copy it over the network with scp more than once. CPU time on the source and destination machines is cheap, ...
21
votes
3answers
11k views

Restricting an SSH/SCP/SFTP user to a directory

Is there a simple way to restrict an SCP/SFTP user to a directory? All methods that I've come across require me to set a chroot jail up by copying binaries, but I don't think that should be necessary. ...
16
votes
2answers
4k 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?
15
votes
4answers
4k 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 ...
1
vote
2answers
337 views

How to specify where files are transferred to using ssh

I know how I can send files to a specific directory on a remote server using ssh, but I don't know how to specify it.
2
votes
2answers
755 views

Puzzle: transfering files between two servers (ssh, ftp, http multipart…)

A puzzle: files being uploaded in realtime by SCP to SERVER1 need to be transfered to SERVER2. But: SERVER1 doesn't actually have network access to SERVER2 (NAT), however SERVER2 has SSH access to ...
6
votes
1answer
2k 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 ...
4
votes
5answers
446 views

Sftp interface to Scp

I have a linux based router that doesn't have the SFTP server installed. More specifically, when I sftp user@ipaddress I get a sh: /user/libexec/sftp-server: not found error. My interest isn't trying ...