LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   set timeout for ssh prompt (http://www.linuxquestions.org/questions/programming-9/set-timeout-for-ssh-prompt-637086/)

vikas027 04-22-2008 02:36 PM

set timeout for ssh prompt
 
Hi all,

I want to set a timeout say 10 sec to shh prompt i.e. if no password is enetered for 10 sec prompt should again come to shell.


How can this be achieved ??

Pls help.

Thanks in adv.
VIKAS

Mara 04-22-2008 03:23 PM

From sshd manual:
Quote:

-g login_grace_time
Gives the grace time for clients to authenticate themselves (default 120 seconds). If the client fails to authenticate the user within
this many seconds, the server disconnects and exits. A value of zero indicates no limit.
That seems to be exactly what you want.

anomie 04-22-2008 04:35 PM

Also, to specify this at the config file level -- from sshd_config(5):
Quote:

LoginGraceTime
The server disconnects after this time if the user has not suc-
cessfully logged in. If the value is 0, there is no time limit.
The default is 120 seconds.


All times are GMT -5. The time now is 07:42 AM.