Created
March 7, 2018 09:17
-
-
Save Bryant-Yang/758d0371061574b0997fa2513340a869 to your computer and use it in GitHub Desktop.
prolong ssh login timeout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo export TMOUT=1000000 >> /root/.bash_profile | |
cat /root/.bash_profile | |
source .bash_profile | |
cp /etc/ssh/sshd_config /etc/ssh/sshd_config_bak | |
echo ClientAliveInterval=60 >> /etc/ssh/sshd_config | |
service sshd restart | |
cat /etc/ssh/sshd_config | |
service sshd restart | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment