transferring files without NFS, SMB, HTTPD, or whatever

Amadeus W. M. amadeus84 at cablespeed.com
Sun Oct 16 17:04:45 UTC 2005


On Mon, 17 Oct 2005 01:56:56 +0930, Tim wrote:

> If I only have SSH access to a remote box, no option to set up NFS, SMB,
> use a HTTP or FTP server, what method do I use to copy a file from one
> box to the other?
> 
> -- 
> Don't send private replies to my address, the mailbox is ignored.
> I read messages from the public lists.

You use scp, whose syntax is similar to cp:

scp source destination

Either source or destination can be remote. You specify the remote
location by pre-pending it with user at remote.machine: (note the : ). 


For instance:

scp user at remote.machine.com:/path/to/file local_file

copies /path/to/file from the remote machine to local_file (in the current
directory where scp is being run).


It also works the other way around:

scp local_file user at remote.machine.com:.

will copy local_file to users' home directory on the remote machine. The .
is important. It's the current directory on the remote machine, which
defaults to the users' home directory.








More information about the fedora-list mailing list