[execnet-dev] Help connecting through ssh jump host

Prasanna Mulgaonkar prasanna.mulgaonkar at gmail.com
Mon Jul 24 19:16:06 EDT 2017


Hi folks, I had figured this out once, but cannot seem to recreate the 
process.

I have one server (A) with a public and private IP, and another (B) with 
a private IP on the same private vlan.

 From my client (C), I want to open an execnet connection from C->A->B.

With pure ssh and forwarding agents, I can have an agent running on C 
which knows my private ssh key, and I can do the following:

ssh -A -t <user>@A ssh <user>@B

and this opens a connection to B via A.

I had made this work a couple of years ago on execnet with something like:

makegateway ("ssh = <user>@A -A ssh <user>@B")

But now I get an error:

> >>> gw=execnet.makegateway("ssh= ec2-user at A -A ssh ec2-user at B" )
> bash: -c: line 0: syntax error near unexpected token `eval'
> bash: -c: line 0: `python -c import sys;exec(eval(sys.stdin.readline()))'
I don't see what I am doing wrong.  I tried moving the -A to various 
places on the line, to no avail. Any help is much appreciated.

--prasanna



More information about the execnet-dev mailing list