remind myself:
1. start 'vncserver -name X' on server computer (that you try to connect by ssh)
Note: X is a session name which is defined in the file: ~/vnc/xstartup
2. ssh -L 5902:localhost:5901 YourAccountName@YourServerID(or hostname) in one local terminal
3. vncviewer localhost:5902 in your another local terminal
Saturday, October 24, 2009
Linux: vnc via ssh
Monday, August 13, 2007
Network: a problem about 'Connection reset by peer'
When I log in a remote computer by ssh from my home and if I keep it inactive for a while (for example, 10 mins), I often was kicked out with the message, for example:
=====================
Read from remote host jasper-clued0.fnal.gov: Connection reset by peer
====================
This happened probably because a firewall or other packet filtering device (such as your router) drops idle connections after a certain period of time.
------------------------------------------
A solution based on the ssh server side can be found here (Dugan provided me with this solution):
http://www.brandonhutchinson.com/OpenSSH_ClientAliveInterval.html
Simply speaking, the solution is add a line
ClientAliveInterval 300
in the file:
/etc/ssh/sshd_config
and reload the sshd server configuration with
/sbin/service sshd reload
--------------------------------------
Another solution based on client side provided by my colleage Horst at Fermilab is: to add
echo 300 > /proc/sys/net/ipv4/tcp_keepalive_time
into the file /etc/rc.local
