X11 Forwarding Over Ssh: Hold Out Remote Graphical App Together With Display Locally

In the modern networked environment, nosotros frequently wishing to run an application on a remote host piece nosotros are comfortably logged inward on our local computer.

Assuming both machines are Linux-based, as well as the application runs on the graphical X desktop, the next approaches come upwardly to mind:

  • VNC
  • X11 forwarding over SSH

This article focuses exclusively on X11 forwarding. X11 forwarding over SSH enables you lot to run a remote X app as well as display it locally, amongst traffic betwixt the 2 hosts encrypted past times SSH.

For X11 forwarding over SSH to work, both the SSH customer as well as SSH server must live on properly configured.

X11 forwarding must live on enabled on The SSH server side. This is the car where the application resides. To enable the feature, brand certain the X11 configuration file /etc/ssh/sshd_config on the server contains this line:

 X11Forwarding yes 

If you lot edit the said file, you lot involve to restart the sshd daemon for the modify to conduct maintain effect.

On Debian or Ubuntu systems, you lot restart the SSH daemon similar this:

 $ sudo service ssh restart [ ok ] Restarting OpenBSD Secure Shell server: sshd. $ 

On the ssh customer side, you lot involve to run SSH ascendancy amongst the proper parameters. For instance, suppose you lot desire to run the xclock application on the remote SSH server as well as conduct maintain it displayed dorsum on the local client.

 $ ssh -fX peter@192.168.1.112 xclock  peter@192.168.1.112's password:  $ 

The -X parameter allows an one-off X11 forwarding session.

The -f parameter instructs the SSH customer to instruct to the background merely earlier xclock is run.

If you lot desire to permanently enable X11 forwarding for an user, insert this trouble inward the user's ain /.ssh/config file on the local host.

 ForwardX11 yes  

With X11 forwarding permanently enabled for the client, you lot tin exit out the -X parameter:

 $ ssh -f peter@192.168.1.112 xclock  peter@192.168.1.112's password:  $ 

If X11 forwarding is non enabled on the SSH server, whatever movement to tunnel X11 volition neglect amongst the next mistake message:

 $ ssh -X peter@192.168.1.112 xclock  peter@192.168.1.112's password:  X11 forwarding asking failed on channel 0 Error: Can't opened upwardly display:  $ 
If X11 forwarding is properly enabled on the server side, you lot volition come across a dainty looking clock displayed on your local screen.

Berlangganan update artikel terbaru via email:

0 Response to "X11 Forwarding Over Ssh: Hold Out Remote Graphical App Together With Display Locally"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel