hw-1

how to enable ssh keepalive ,socat keep alive

how to enable ssh keepalive ,socat keep alive

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# ssh enable keepalive
# via config
sudo vim /etc/ssh/sshd_config
...
ClientAliveInterval 30
TCPKeepAlive yes
ClientAliveCountMax 2
#via command opt
ssh -o ServerAliveInterval=60 myname@myhost.com

#restart sshd
sudo service sshd restart

#socat TCPKeepAlive
socat TCP-LISTEN:8000,reuseaddr,fork,keepalive,keepidle=10,keepintvl=30,keepcnt=2 TCP:127.0.0.1:80