...
Code Block |
---|
language | bash |
---|
theme | RDark |
---|
title | Disable SSH timeout |
---|
|
sed -i '/^.*ClientAliveInterval.*$/d' /etc/ssh/sshd_config
sed -i '/^.*ClientAliveCountMax.*$/d' /etc/ssh/sshd_config
service sshd restart |
Once your long running activity has completed, issue the following commands to reinstate the short timeout settings:
Code Block |
---|
language | bash |
---|
theme | RDark | title | Enable SSH timeout |
---|
|
sed -i 's/^.*ClientAliveInterval.*$/#ClientAliveInterval 300/' /etc/ssh/sshd_config
sed -i 's/^.*ClientAliveCountMax.*$/#ClientAliveCountMax 0/' /etc/ssh/sshd_config
service sshd restart |