Adding support for the ProxyCommand feature #34
Conversation
Now, instead of just ignoring the ProxyCommand var, the ssh library is able to retrieve this configuration from the `~/.ssh/conf` file and use it to proxy the connection between the client and the SSH server. This commit introduces the ssh.proxy module that implements the interface required by the client.Transport class. But instead of using sockets, this class writes and reads info from a peopened program that actually talks with the ssh server.
will this change mean we no longer have to manually tunnel in fabric? |
Yep, @bninja exactly! But you'll also need this patch in fabric in order to make things work: |
@clarete great work! cant wait to use this. i've had to use the tunnel hack for most of my deploys (target machines are typically behind bastions). |
Hey @bitprophet, is there anything that I could do to see these patches applied? Thanks :) |
Actually, yes, I just finished a major effort to port all 'ssh' changes back into Paramiko, so the next step is to address the open tickets here (this one included). All that should be necessary is renaming the local imports. If you'd like to give that a shot I'd appreciate it; should just be:
Once that's taken care of I'll make testing out the functionality of this ticket my highest priority. Minor caveat: for the next ~day (hopefully less) you will need to use the Fabric branch Thanks again for your patience! |
Count on me, working on it! :) |
Finally! paramiko/paramiko#97 Sorry for taking so long :( |
Clarete , this was the thing i needed , thanks a lot man , but still there's one problem where i am stuck , My web servers are behind load balancer and only the way to access my web server is first login to my load balancer (jump host) as regular user , and then i have to use sudo su - (username) to switch to a user who have right to access the web servers , now using fabric/paramiko i am logged in to my jump host , but i am not able to execute the command sudo su - (username) ....... this username has authority to login to all web servers using ssh , so please can u guide me . Thanks & Regards |
Closing this as Paramiko merged & deployed support for it some time ago \o/ |
Now, instead of just ignoring the ProxyCommand var, the ssh library is able to retrieve
this configuration from the
~/.ssh/conf
file and use it to proxy the connection betweenthe client and the SSH server.
This commit introduces the ssh.proxy module that implements the interface required by
the
client.Transport
class. But instead of using sockets, this class writes and reads infofrom a peopened program that actually talks with the ssh server.
Given the following ssh config entry:
Here's a simple test case
Run it with the following comand: