This is the second part in a four part series covering remote access to Linux machines using SSH.
Everything in this tutorial should apply to most Linux distributions, however some of the commands may be specific to Ubuntu. You may need to modify some commands to work with your Linux distribution. This is an advanced tutorial, so most instructions will be given as text commands.
Allowing outside machines to access your computer is inherently risky. Assuming your router and/or firewall is properly configured, you will need to poke some holes in it. This potentially leaves you vulnerable to attack. Proceed at your own risk. Because security is a constantly changing issue, you are responsible for securing your own computer and network. You have been warned. If you are not behind a router or other physical firewall and you can’t explain why this is the case, do not proceed.
You’ll be glad to know that the graphical piece is actually a lot easier than the first two parts. It’s really just a few configuration changes and that’s it.
Open your /etc/ssh/sshd_config file.
gksudo gedit /etc/ssh/sshd_config
Then make sure that X11Forwarding is set to on and both of the lines below are uncommented (meaning that they do not have a # in front on them:
X11Forwarding yes X11DisplayOffset 10
That’s it on the server end!
You may also need to change some settings on the computer from which you are connecting. Open your /etc/ssh/ssh_config file. Notice the subtle difference between sshd_config and ssh_config.
gksudo gedit /etc/ssh/ssh_config
Then you need to make sure that these lines are uncommented:
ForwardAgent yes ForwardX11 yes ForwardX11Trusted yes
Now try connecting again:
ssh -X -p <em>port number</em> <em>username</em>@<em>dyndns username</em>.dyndns.com
Then just type the name of a graphical application:
gnomine
Just take a moment to think about how cool it is that you’re running Gnome Mines graphically across the internet from a different computer.
Related posts:
No comments on this post so far.
Be the first to leave a comment!