Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in ssh with

 ssh -CX user@remoteA

I can launch a xterm and see in my local desktop.

if I have a linux server (remoteA) without X server and a remote linux desktop (remoteB) with a X server.
If I connect with ssh to remoteB over remoteA

local -ssh-> remoteA -ssh-> remoteB

how I can launch a xterm in remoteB and see in local ?

share|improve this question

You need to setup an end-to-end SSH connection, i.e. from local to remoteB, instead of chaining via remoteA. If you can't get to remoteB directly, either setup a port forward via remoteA, or use a ProxyCommand.

To use a port forward:

ssh -fNL 2222:remoteB:22 remoteA
ssh -Xp 2222 localhost

To use a ProxyCommand:

ssh -X -o "ProxyCommand=ssh remoteA nc %h %p" remoteB
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.