-   Programming (
-   -   set timeout for ssh prompt (

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.

Mara 04-22-2008 03:23 PM

From sshd manual:

-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):

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 04:19 PM.