OpenSSH

Well, instead of spending Saturday night wasting my time at the mall or at that place people call movie theaters, I got a chance to play around with OpenSSH more in depth.

I use ssh to log into my server practically every single day, but I really wasn’t aware all of its actual capabilities. After looking at the /etc/ssh/sshd_config file, I noticed there was an X11 forwarding option which was disabled by default. Given that I don’t have X-Windows installed on my server, I’ve decided to install ssh on my desktop computer so I can try it out.

Steps to enable X11 forwarding

  • Open /etc/ssh/ssh_config and comment out:
    # ForwardAgent yes
    # ForwardX11 yes
    # ForwardX11Trusted yes
  • Open /etc/sshd_config and (X11Forwarding yes) should already be commented out
  • Restart ssh server
  • sudo /etc/init.d/ssh restart

    That’s it!!!

  • Now log on into the remote machine using the -X option
  • ssh -X [email protected]

    type gnome-session
    Your X session should automatically start.

    I also logged in using OS X and it worked perfectly fine. Everything was kinda off sluggish to use, and I was doing everything completely on wireless so that probably made it even more slower. In conclusion who needs VNC when you could securely forward X11 session between *nix computers using ssh!!

    Leave a Reply

    Your email address will not be published. Required fields are marked *