Sponsored Content
Full Discussion: set timeout for ssh prompt
Top Forums Shell Programming and Scripting set timeout for ssh prompt Post 302188050 by vikas027 on Tuesday 22nd of April 2008 02:36:17 PM
Old 04-22-2008
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 ??
I am using Linux RHEL 5 and Solaris 10.

Pls help.

Thanks in adv.
VIKAS

Last edited by vikas027; 12-12-2008 at 05:33 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to set timeout for aix?

if a user login and never shutdown or exit...how do you set an automatic shutdown or timeout if the user leave the session on for 20 minutes? thanks (3 Replies)
Discussion started by: ichiro
3 Replies

2. Programming

How to set the timeout for the client

The scenerio is: 1. A server listens on a port number 2. If the server is down and the Client tries to connect 3. How to set the timeout for the client Detailed explaination: In a client server architecture over a TCP/IP, normally the server is started first which waits and listens for the... (1 Reply)
Discussion started by: shilpi_gup
1 Replies

3. Shell Programming and Scripting

how to set timeout?

When I run a script where the 1st parameter is ip address ftp -n -i -v $1 I hang here if the ip is wrong how to set a timeout something like if (20s not complete "ftp -n -i -v $1") then echo "error" fi Thanks a lot. (14 Replies)
Discussion started by: uativan
14 Replies

4. UNIX for Dummies Questions & Answers

Is it possible to set a timeout for rpcinfo?

I've created a script that checks the health of a piece of equipment out in the field by first establishing that it is pingable, and then parsing log files to gather information. Today I realized that there are times where the equipment may be pingable, and will not show any immediate issues in... (1 Reply)
Discussion started by: DeCoTwc
1 Replies

5. Shell Programming and Scripting

set Net:SSH:Expect timeout and set it again.

SSHing into a machine can take a few seconds, but after I'm in, the commands return quickly. I was wondering if the timeout setting can be changed once I'm logged into the machine. Does anyone know if this can be set on the fly? The problem here is, if I have to set timeout = 10, it'll take 10... (1 Reply)
Discussion started by: mrwatkin
1 Replies

6. AIX

Set timeout value for ssh session to HMC?

Friends, Could anyone let me know - how to set the timeout value for ssh session to HMC? My HMC version is -- V7R7.4.0. I'm sure the version doesn't have anything to do with it. Thanks, -- Souvik (2 Replies)
Discussion started by: thisissouvik
2 Replies

7. Red Hat

How to set the screensaver timeout on Red Hat?

How is it possible to set the screensaver timeout on red hat. For solaris I understand it is : for file in /usr/dt/config/*/sys.resources; do dir=`dirname $file | sed s/usr/etc/` mkdir -p $dir echo 'dtsession*saverTimeout: 10' >>$dir/sys.resources echo 'dtsession*lockTimeout: 10'... (0 Replies)
Discussion started by: alvinoo
0 Replies

8. Shell Programming and Scripting

How to set timeout for dev/tcp while checking hostname and port?

I have a command to check the status of hostname and port number, echo > /dev/tcp/hostname/80 echo $? 0 success case echo > /dev/tcp/hostname/809999 I got the output ------------------- connection timed out It took almost 4 minutes to time out,,, how can I set it to 10 seconds? my... (2 Replies)
Discussion started by: sam@sam
2 Replies

9. Linux

Is it possible to set timeout on Linux screen session

Hello friends, I work on Linux servers via SSH (putty) and run "screen" to preserve my sessions so I can attach/detach them at anytime I wish without losing the connectivity/process disruption which is working perfectly fine. As my team members also have root access to those servers, it is... (7 Replies)
Discussion started by: prvnrk
7 Replies

10. AIX

AIX ssh timeout

I have to make a command to work when connecting to AIX 7.1 (used by an internal software). I have a linux server L where the following command is runned ssh -t <aix-server-ip> ls For a <non-aix-server-ip> the command runs successfully. For AIX the terminal just gets blocked. ssh connection... (5 Replies)
Discussion started by: ufo
5 Replies
PAM_GET_AUTHTOK(3)						 Linux-PAM Manual						PAM_GET_AUTHTOK(3)

NAME
pam_get_authtok, pam_get_authtok_verify, pam_get_authtok_noverify - get authentication token SYNOPSIS
#include <security/pam_ext.h> int pam_get_authtok(pam_handle_t *pamh, int item, const char **authtok, const char *prompt); int pam_get_authtok_noverify(pam_handle_t *pamh, const char **authtok, const char *prompt); int pam_get_authtok_verify(pam_handle_t *pamh, const char **authtok, const char *prompt); DESCRIPTION
The pam_get_authtok function returns the cached authentication token, or prompts the user if no token is currently cached. It is intended for internal use by Linux-PAM and PAM service modules. Upon successful return, authtok contains a pointer to the value of the authentication token. Note, this is a pointer to the actual data and should not be free()'ed or over-written! The prompt argument specifies a prompt to use if no token is cached. If a NULL pointer is given, pam_get_authtok uses pre-defined prompts. The following values are supported for item: PAM_AUTHTOK Returns the current authentication token. Called from pam_sm_chauthtok(3) pam_get_authtok will ask the user to confirm the new token by retyping it. If a prompt was specified, "Retype" will be used as prefix. PAM_OLDAUTHTOK Returns the previous authentication token when changing authentication tokens. The pam_get_authtok_noverify function can only be used for changing the password (from pam_sm_chauthtok(3)). It returns the cached authentication token, or prompts the user if no token is currently cached. The difference to pam_get_authtok is, that this function does not ask a second time for the password to verify it. Upon successful return, authtok contains a pointer to the value of the authentication token. Note, this is a pointer to the actual data and should not be free()'ed or over-written! The pam_get_authtok_verify function can only be used to verify a password for mistypes gotten by pam_get_authtok_noverify(3). This function asks a second time for the password and verify it with the password provided by authtok argument. In case of an error, the value of authtok is undefined. Else this argument will point to the actual data and should not be free()'ed or over-written! OPTIONS
pam_get_authtok honours the following module options: try_first_pass Before prompting the user for their password, the module first tries the previous stacked module's password in case that satisfies this module as well. use_first_pass The argument use_first_pass forces the module to use a previous stacked modules password and will never prompt the user - if no password is available or the password is not appropriate, the user will be denied access. use_authtok When password changing enforce the module to set the new token to the one provided by a previously stacked password module. If no token is available token changing will fail. authtok_type=XXX The default action is for the module to use the following prompts when requesting passwords: "New UNIX password: " and "Retype UNIX password: ". The example word UNIX can be replaced with this option, by default it is empty. RETURN VALUES
PAM_AUTH_ERR Authentication token could not be retrieved. PAM_AUTHTOK_ERR New authentication could not be retrieved. PAM_SUCCESS Authentication token was successfully retrieved. PAM_SYSTEM_ERR No space for an authentication token was provided. PAM_TRY_AGAIN New authentication tokens mismatch. SEE ALSO
pam(8) STANDARDS
The pam_get_authtok function is a Linux-PAM extensions. Linux-PAM Manual 06/04/2011 PAM_GET_AUTHTOK(3)
All times are GMT -4. The time now is 01:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy