Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-22-2008, 01:36 PM   #1
Senior Member
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,300

Rep: Reputation: 102Reputation: 102
Question 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.
Old 04-22-2008, 02:23 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 180Reputation: 180
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.
Old 04-22-2008, 03:35 PM   #3
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set TCP Timeout xenomage Linux - Networking 5 11-23-2009 04:08 PM
isolinux.cfg - can not have a prompt and timeout Bluesuperman Slackware 3 09-28-2008 05:34 AM
How do i set timeout in UNIX just_a_kid Linux - Newbie 1 03-29-2007 08:59 PM
How to set timeout value in Konqueror mldqj Linux - Software 1 04-03-2004 04:42 PM
ssh timeout blackmercury Linux - General 1 06-02-2003 05:32 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration