[execnet-dev] Help connecting through ssh jump host

RonnyPfannschmidt opensource at ronnypfannschmidt.de
Tue Jul 25 01:29:01 EDT 2017


Hi prasanna,

execnet has grown support to do the following

hop = makegateway("ssh=a//id=hop")
gw = makegateway("ssh=b//via=hop")


as for the first example you gave,
that looks like it might have worked by accident,
for clarification please bisect at which version it worked and broke so
we can link it to a feature induction

-- Ronny


Am 25.07.2017 um 01:16 schrieb Prasanna Mulgaonkar:
> 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
>
> _______________________________________________
> execnet-dev mailing list
> execnet-dev at python.org
> https://mail.python.org/mailman/listinfo/execnet-dev



More information about the execnet-dev mailing list