photo
Jordan Sissel
geek

Wed, 06 Aug 2008

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

Comments: 1 (view comments)
Tags: , ,
Permalink: /geekery/rsync-ssh-trick
posted at: 01:06


1 responses to 'rsync through an ssh server'

Justin Mason posted at Wed Aug 6 05: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:


Search this site

Navigation

Metadata

Home About Resume My Code (SVN)

Articles

ARP Security Dynamic DNS with DHCP OpenLDAP+Kerberos+SASL PPP over SSH SSH Security: /bin/false Week of Unix Tools Work Efficiency

Projects

fex firefox tabsearch firefox urledit grok keynav liboverride newpsm (FreeBSD) nis2ldap pam_captcha poor man's backup Solaris audio utility xboxproxy xdotool xmlpresenter xpathtool misc scripts

Presentations

Yahoo! Hack Day '08 Yahoo! Hack Day '06 Unix Essentials Vi/Vim Essentials SSH Tunneling (Video)

Tag Cloud

Calendar

< August 2008 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
31      

Friends

BarCamp Kent Brewster Tantek Çelik John Resig Wesley Shields Tyler Shields

Technorati