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



_______________________________________________
Fab-user mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to