0

I've currently have the following situation.

I have a server, that is connected to the internet with ssh (on a non 22 port). This is an ubuntu server without X server. Now i have a machine inside this network, that is used as a desktop machine.

Is it possible to forward all request on a specific port (for the server) directly to that desktop machine, to be able to use the Xserver over SSH?

1
  • What OS, terminal software and X server are you using on the local machine? Jan 31, 2011 at 15:46

2 Answers 2

0

Just pass the -X argument when connecting to your server using ssh, and you'll be able to launch applications on the server that are displayed on the client.

3
  • Eraser, i need indeed connect to the server, but this server doesn't have xserver installed. And i need to run applications from the desktop that's behind the server.
    – Grezly
    Jan 31, 2011 at 15:02
  • Ok, so you want to connect to the server, and the server will actually forward your request to the desktop?
    – user68055
    Jan 31, 2011 at 15:06
  • The just create an ssh tunnel. See the -L arg documentation in the ssh man page.
    – user68055
    Jan 31, 2011 at 15:06
0

By far the simplest way to do this is to install VNC Server on the Desktop machine.

Then you can do the following from your laptop with RealVNC Viewer installed: vncviewer desktop:1 -via [email protected]

To connect directly to the desktop. This will automatically SSH to servername.domain.com, forward a port to the destination VNC server, then connect to that port. Replace desktop with the internal DNS name or IP of the desktop, and of course the rest should be obvious there.

As an alternative there's also X forwarding, which you can bounce through a tunnel, but XLib does not make any attempts to optimize for bandwidth.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .