Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am on centos server (via SSH) and I don't want to open file manager to copy dump file. What comand whould I use (scp or what) to copy that file from remote server directly to my comp.


cp ssh://user@server/app/dump.dat /home/


even more interested in how to copy file from my ssh session while I am on server back to my PC (of course I can logout or open new terminal tab or start up SSH server on PC)

share|improve this question

4 Answers 4

up vote 2 down vote accepted
scp /some/local/directory

This Reference may help.

share|improve this answer
and how to use scp vice versa when I am on my remote server? –  fl00r Mar 23 '11 at 15:50
@fl00r: Start the SSH server on your PC, then use scp –  grawity Mar 23 '11 at 15:54
as I thought :) But I don't want to start ssh server. thx –  fl00r Mar 23 '11 at 15:55
If you're behind a firewall or behind NAT the only way without setting up port forwarding is to use a 'client pull' system (scp run locally) or to tunnel something back down through the SSH channel with SSH's port tunneling. What you'd use for that is anyone's guess, but you'd need to start some form of server on your local machine - be it sshd, ftpd, or whatever. –  Majenko Mar 23 '11 at 16:02
unless the terminal you are using supports something like zmodem then you could use sz to send the file as if you were on a slow serial connection... smirk –  Majenko Mar 23 '11 at 16:03
$ scp user@server:/app/dump.dat /home/

For a path relative to your home dir miss out the first /

Take a look at the scp man page for more detail.

share|improve this answer

rsync is generally a better option. It is restartable, for one thing. Also, it is generally faster. See man rsync for tons of options.

rsync -abvz /some/local/directory

rsync is probably configured to use ssh by default, but if you want to be extra careful you can do

rsync -abvz -e ssh /some/local/directory
share|improve this answer


sudo -r scp file username@IP address or hostname:Destination


scp -r /media/disk/summer_pics/ mike@"/var/www/Summer 2008/"


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.