Do you want to control the login timeout for the SSH server? You can control it with the LoginGraceTime setting.
LoginGraceTime
sshd_config man page
The server disconnects after this time if the user has not successfully logged in. If the value is 0, there is no time limit. The default is 120 seconds.
Use your favorite text editor to edit the SSH server settings:
nano /etc/ssh/sshd_config
Look for the LoginGraceTime value – add it or adjust its value:
LoginGraceTime 10
We adjusted it here to 10 seconds. Users will have 10 seconds to log in to the SSH server. Don’t forget to restart the SSH server:
service sshd restart
Resources:
sshd_config man page