Do you want to control the login timeout for the SSH server? You can control it with the LoginGraceTime setting.
LoginGraceTimesshd_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:
Look for the LoginGraceTime value – add it or adjust its value:
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
sshd_config man page