Yesterday, I opened a new VPS. When I repeatedly installed LNMP, I was forced to terminate because of an error. Moreover, I found many ways to do so, one of which was to add sshd to the VPS_ Add a value to the config file: tcpkeepalive yes. I haven’t tried this. Another method I use is to modify the file
Step 1: SSH instruction input: VI/etc/SSH/sshd_ Then enter
Step 2: press the key and keep finding the last line here. You will see the sentence “clientaliveinterval 0” in the penultimate line
Step 3: change the number 0 to 60
Step 4: press ESC, press Ctrl + Q, input WQ, press enter to save
Step 5: service sshd restart
The above method was given to me by the VPS supplier, but I think the most important thing is that the Ping value of the VPS is a little high
Scheme 1:
1. Set “sending of null packets to keep session active” in the connection project of putty, that is, to send a null packet every few seconds so that the session will not be timed out
2. In/etc/SSH/sshd of sshd host_ Config setting: tcpkeepalive yes
Scheme 2:
Modify the/etc/SSH/sshd.config file in the server, set the value of logingracetime to 0, default to 2m, set tcpkeepalive to yes, and then use service sshd restart to restart the sshd service
Supplement:
In sshd_ There is a logingracetime variable in config, whose value parameter is seconds, which indicates the number of seconds after the user logs in with SSH, but does not enter a password.
this variable works normally in both x86 and S9 of S10, but it does not work in SPARC of S10.
although it reaches the specified time, The system will print sshd [3968]: [ID 800047 auth. Crit] monitor fatal: timeout before authentication for 135.252.106.61
in/var/ADM/messages, but in fact it will not break the link. It is still waiting for the user to enter the password. And it will automatically break the link only after the correct input
Scheme 3:
Step 1: SSH instruction input: VI/etc/SSH/sshd_ Then enter
Step 2: press the key and keep finding the last line here. You will see the sentence “clientaliveinterval 0” in the penultimate line
Step 3: change the number 0 to 60
Step 4: press ESC, press Ctrl + Q, input WQ, press enter to save
Similar Posts:
- [Solved] Git Error: failed: authentication failed for ‘http: XXXX.git / ”
- Solutions to Ubuntu forgetting password and root password
- For piix4_ Solution of SMBus * * host SMBus controller not enabled (detailed steps summary)
- Mysql database initialization password error: error: ‘access denied for user’ root ‘@’ localhost ‘(using password: Yes)’
- sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, q…
- [Solved] Access denied for user ‘ODBC’@’localhost’ (using password: NO)
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- [Solved] VUE npm run devevents.js:160 throw er; // Unhandled ‘error’ event listen EADDRIN…
- [Solved] SSH connect error: permission denied, please try again
- When installing MySQL database on MAC, the system prompts MySQL: command not found