1. Ubuntu Server
- make sure the X11Forwarding option in /etc/ssh/sshd_config is set to yes. If not, set it to yes, and restart the sshd service by "sudo service ssh restart"
- test X11Forwarding in server
- Open a terminal in Ubuntu, and "ssh -v -X localhost" to establish the ssh connection with X11Forwarding.
- Check if there's a line with "Requesting X11 Forward" shown in the debug output
- Check DISPLAY environment variables by "echo $DISPLAY" and it should be localhost:10.0
Reference: http://ruepprich.wordpress.com/2013/01/08/x11-forwarding-on-os-x-10-8-2-mountain-lion/
- Install XQuarz for Mac OS
- Open iTerm and add remote server to access list by "sudo xhost + 192.168.56.101"
- There's an error about 'xhost: unable to open display ""'
- And ssh -X user@192.168.56.101 also failed to take X running
- Open XQuarz, and open "Terminal" in Application Menu
- bash-3.2$ xhost + 192.168.56.101
192.168.56.101 being added to access control list - bash-3.2$ ssh -X rye@192.168.56.101
- rye@rye-desktop:~$ echo $DISPLAY
localhost:11.0 - xclock works
Thanks! Helped me a lot!
ReplyDelete