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

Open
GoogleCodeExporter opened this issue Mar 13, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

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

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 code.google.com by dhahler@gmail.com on 31 Jul 2010 at 6:18

@GoogleCodeExporter
Copy link
Author

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 
"outer:inner".

Original comment by dhahler@gmail.com on 31 Jul 2010 at 7:00

@GoogleCodeExporter
Copy link
Author

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 njsmith@ucsd.edu on 31 Jul 2010 at 9:14

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

@GoogleCodeExporter
Copy link
Author

Original comment by njsmith@ucsd.edu on 31 Jul 2010 at 9:14

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

@GoogleCodeExporter
Copy link
Author

I guess you could also do (--ssh is a 'new' flag, so this is required for older 
version):
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 
%h"

Original comment by norm...@google.com on 4 May 2011 at 10:22

@GoogleCodeExporter
Copy link
Author

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

Let say you're able to connect to host outer.host.example.com with public key 
authentication and from there to inner.host.example.com 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 
                hostname inner.host.example.com
                compression yes
                protocol 2
                ProxyCommand ssh outer.host.example.com "/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 martin.r...@gmail.com 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
Projects
None yet
Development

No branches or pull requests

1 participant