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: Christian Vest Hansen
Subject: Re: [Fab-user] Connecting to a remote host through an ssh gateway
Date: Sun, 15 Feb 2009 12:30:00 +0100

On Sat, Feb 14, 2009 at 8:51 PM, David Anderson <address@hidden> wrote:
> Hi all,
>
> I'd like to use Fabric to deploy some software to a server that is
> sitting in a DMZ, behind an ssh gateway. That is, I have to first ssh
> into the gateway, then from there I can ssh into the production
> machine. I have no direct access to the production ssh.
>
> I've already configured my local ssh with the following:
>
> Host prod.example.com
> ProxyCommand ssh gate.example.com nc -w 1 prod.example.com 22
>
> This configuration, provided that my ssh keys are on both machines,
> enables me to transparently `ssh prod.example.com`. I was expecting
> that Fabric would simply reuse this, and have no trouble connecting to
> the remote machine. Sadly, it seems that Paramiko does not honor
> OpenSSH's configuration file, and so the connection fails. This is
> with an easy_installed 0.0.9.
>
> Is there a way to specify gateway hopping to Fabric explicitely?

There is no direct support for ssh gateways in fabric, if paramiko
does not provide this transparently.

> Failing that, does 0.1.0 somehow improve on this situation?

Currently no plans or efforts in that direction.

> Failing
> all of that, is there any way I can get what I need short of
> establishing a localhost:2222 tunnel on the side before running
> Fabric?

You might be able to some trickery by setting the "fab_shell" to
something like "ssh $(fab_host)" but then sudo() won't work and
there's also a question about exit codes that the man-page didn't
answer.

Otherwise, use a tool that does support ssh gateways.

>
> Cheers,
> - Dave
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>



-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.




reply via email to

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