Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 1

Linux Important Command

# ssh -o ServerAliveInterval=5 -o ServerAliveCountMax=1 $HOST


This will send a ssh keepalive message every 5 seconds, and if it comes
time to send another keepalive, but a response to the last one wasnt
received, then the connection is terminated.
The critical difference between ServerAliveInterval and TCPKeepAlive is
the layer they operate at.
TCPKeepAlive operates on the TCP layer. It sends an empty TCP ACK
packet. Firewalls can be configured to ignore these packets, so if you
go through a firewall that drops idle connections, these may not
keep the connection alive.
ServerAliveInterval operates on the ssh layer. It will actually send data
through ssh, so the TCP packet has encrypted data in and a firewall
cant tell if its a keepalive, or a legitimate packet, so these work
better.
#ssh ceda@222.124.151.218 -p 22002 -R 14001:<local IP of your
VM>:5050
14001 is remote port for binding data
#ntpdate pool.ntp.org
Update / sync time to pool.ntp.org
#top -p `pgrep -d, -f dTRCore`
#gcc -Wall dTRCore.c -o dTRCore
#killall -e dTRCore
#g++ -Wall dTRCore.c -o dTRCore
#pidof -x dTRCore
#mv log log.$(date +%Y%m%d)

You might also like