Copy files over ssh

Matthew Miller mattdm at mattdm.org
Sat Feb 12 06:24:19 UTC 2005


On Sat, Feb 12, 2005 at 02:07:29AM -0400, Arthur Pemberton wrote:
> I've done some reading, but I guess I just didn't get it. How exactly is 
> the best way to get a file from a machine that I've sshed to, to a the 
> machine that I am sshing from? I would think there's some way better 
> than ftping.

  scp local.filename remotehost:remote.filename


(with "local" being the machine you're currently typing on, and "remote"
being any machine, which could of course be the same one you connected
from.)

You can also do 

  scp remotehost:remote.filename local.filename

of course.

And, if you use ssh keys and ssh-agent, you can even do this without
providing a password, and (I think this is the coolest thing since sliced
bread delivered of the internet) if you have bash-completion installed from
fedora extras, you'll even get tab completion of remote filenames.

-- 
Matthew Miller            mattdm at mattdm.org        <http://www.mattdm.org/>
-->  Fedora Users & Developers Conference, hosted by Boston University  <--
February 18th, 2005                       <http://fedoraproject.org/fudcon/>  




More information about the fedora-list mailing list