Search this site


Metadata

Articles

Projects

Presentations

rsync through an ssh server

I have a host (let's call it filer) that is only accessible through a bastion server. Here's how to rsync directly do that host:
rsync -e 'ssh bastion ssh' somefile.tar.gz filer:
I haven't posted much recently due to my wedding coming soon and being extremely busy with work. I've been learning a great deal of new tools recently, so expect some brain dumps about some of the following:
  • lvm
  • qemu
  • windows hackery

1 responses to 'rsync through an ssh server'

Showing last 1 comments... (Click here to view all comments)

Justin Mason wrote at Wed Aug 6 02:00:52 2008...
I recently found a cleaner way to do that.  Instead of using "rsync -e", edit ~/.ssh/config and add a stanza like this:

Host filer
  ControlPath ~/.ssh/master-filer
  ProxyCommand ssh bastionhost nc %h 22

you can now just "ssh filer" or "rsync ... filer:" without any "-e" noise. (hope that comes through cleanly -- a comment-preview would be nice ;)

The "ControlPath" gives you cached connections, too, very handy....


Leave a reply

You need javascript enabled to use this form. Anti-spam efforts ongoing. Also, if the comment doesn't show up, it's because the form expired. Go back and copy your comment, reload the form, and resubmit. Apologies if this is a hassle, I'm just playing with antispam methods right now. If this insists on not working, please email me about it.

Name (required)
E-mail (optional, if you want me to be able to email you back)
URL (also optional)
Comment: