fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Connecting to a remote host through an ssh gateway


From: Jordi Funollet
Subject: Re: [Fab-user] Connecting to a remote host through an ssh gateway
Date: Sun, 15 Feb 2009 15:23:33 +0100
User-agent: KMail/1.10.3 (Linux/2.6.27-11-generic; KDE/4.1.3; i686; ; )

David Anderson dixit:
> Host prod.example.com
> ProxyCommand ssh gate.example.com nc -w 1 prod.example.com 22

Hi David,

There's how I deal with this:

#------------------------------------------------
# .ssh/config

Host gate.tunnel
    Hostname gate.example.com
    LocalForward 2000 prod.example.com:22

Host prod.tunnel
    Hostname 127.0.0.1
    Port 2000
#------------------------------------------------

I create a tunnel that closes after 30 seconds or when the tunneled connexion 
finishes:

  $ ssh gate.tunnel -f sleep 30

And now you can launch Fabric commands or plain SSH commands:

  $ scp /this/file prod.tunnel:/tmp

The great problem with this approach is I must maintain several SSH 
configurations for every host, depending on where I am connecting from. And I 
must reconfigure 'fab_hosts' for the same reason, too.

I really like Fabric and try to find workarounds for the Paramiko limitations, 
but not having a real SSH but just a seriously limited subset of the tool is, 
sincerely, a pain.

I understand that I'm not the most typical Fabric user because I'm not a 
developer but a sysadmin, and many times my needs doesn't fit into the deploy-
restart-or-rollback schema. But I think supporting the full SSH set of 
commands could be really beneficial for many Fabric users.

Would it be possible to wrap the 'ssh' command as backend instead of Paramiko? 
I haven't yet taken a loot at how Fabric does this, but looks like PuSSH [1] 
is using this approach.

[1] http://pypi.python.org/pypi/PuSSH/

Please take this as a suggestion for improvement, not as criticism. I like 
Fabric and it's solving many needs for me ;-) even with the Paramiko 
limitations. And, what's more important, I enjoy using it.

-- 
##############################
### Jordi Funollet
### http://www.terraquis.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]