1833883 Members
1887 Online
110063 Solutions
New Discussion

Re: ssh timeout

 
Krishnan Viswanathan
Frequent Advisor

ssh timeout

Is there a way to specify timeout (of 30 seconds) for ssh or scp in a script ?
This script grabs data from many servers via scp but I don't want the scp command to wait for any user intiated action etc for longer than 30 seconds. Instead I would like it to abort.

What is the command line option ? (if any). I could'nt find it on scp or ssh man pages

Thanks !




2 REPLIES 2
Michael Tully
Honored Contributor

Re: ssh timeout


Have a look at this posting.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=246700
Anyone for a Mutiny ?
Joseph Loo
Honored Contributor

Re: ssh timeout

Hi,

Try adding:

TMOUT=
readonly TMOUT

to /etc/profile for all users or /.profile.

regards.
what you do not see does not mean you should not believe