Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add syntactic sugar to "ssh:" scheme for bouncing through multiple hosts #28

GoogleCodeExporter opened this issue Mar 13, 2015 · 5 comments


Copy link

I'd like to attach to an internal server, which is only reachable via an outer 

I've tried the following, but it did not work:
% xpra attach ssh:outer:inner:7
Attached (press Control-C to detach)
zsh: no such file or directory: /home/user/.xpra/run-xpra
Connection lost

Is there a way to get this working?
Otherwise I suggest xpra should connect to the next host, until it finds a port 
number or something similar.

Original issue reported on by on 31 Jul 2010 at 6:18

Copy link

I found out that I can use the "--ssh" argument for this:
% xpra --ssh 'ssh outer ssh' attach ssh:inner:7

It would be useful though, if xpra would transform this automatically out of 

Original comment by on 31 Jul 2010 at 7:00

Copy link

Right, that's the workaround I would have suggested :-) But I imagine that this 
comes up relatively often, so that's a good idea to provide a nice syntax.

(Also, FYI, depending on your setup, you might want to consider just running 
xpra on 'outer', and then using X forwarding from 'inner' to 'outer' -- that's 
what I do when running stuff on our compute cluster, that has one 'bastion' 
host where I run screen+xpra and then a bunch of hosts with fast network 
connections that I can ssh onwards to.)

Original comment by on 31 Jul 2010 at 9:14

  • Changed title: add syntactic sugar to "ssh:" scheme for bouncing through multiple hosts

Copy link

Original comment by on 31 Jul 2010 at 9:14

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

Copy link

I guess you could also do (--ssh is a 'new' flag, so this is required for older 
xpra --remote-xpra 'ssh inner .xpra/run-xpra' attach ssh:outer:7

and/or setup a .ssh/config entry for inner that sets ProxyCommand "ssh outer -W 

Original comment by on 4 May 2011 at 10:22

Copy link

Like suggested in comment #4, this functionality can be achieved with 
ProxyCommand option for openssh.

Let say you're able to connect to host with public key 
authentication and from there to also with public key 
authentication (key is loaded in ssh-agent and agent connection is forwarded).

Then by configuring following entry in $HOME/.ssh/config ...

host outer-inner 
                compression yes
                protocol 2
                ProxyCommand ssh "/bin/nc %h %p"
                ForwardAgent yes

... will allow you to ssh to inner host in one step ...

  ssh outer-inner

... or use xpra from your client as ...

  xpra attach ssh:outer-inner:DISPLAY_NUMBER

It works perfectly for me.

Original comment by on 28 Dec 2011 at 11:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant