Re: Forcing SSH to timout after a certain time if it isn't responding
From: andy (andy_at_wpi.edu)
Date: 11/19/03
- Previous message: Oli K-u-r-t: "sftp on win"
- In reply to: Darren Dunham: "Re: Forcing SSH to timout after a certain time if it isn't responding"
- Next in thread: Darren Dunham: "Re: Forcing SSH to timout after a certain time if it isn't responding"
- Reply: Darren Dunham: "Re: Forcing SSH to timout after a certain time if it isn't responding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 19 Nov 2003 12:50:53 -0800
I tried using
ssh -o BatchMode=yes -o ConnectTimeout=2 <ip.add.re.ss> /bin/true >
/dev/null
But it gives me the follwing error:
command-line: line 0: Bad configuration option: ConnectTimeout
I looked in my ssh_config file, and also in 'man ssh_config', and i
didnt see ConnectTimeout mentioned in either place.
Does this mean I have an older version of ssh? Is there any otehr way
I can ahceive that functionality?
Darren Dunham <ddunham@redwood.taos.com> wrote in message news:<Rgyub.6710$3E7.55264382@newssvr21.news.prodigy.com>...
> In comp.security.ssh andy <andy@wpi.edu> wrote:
> > Hi,
>
> > I'm wiritng a Bash script where I want to check if I can SSH into a
> > certain IP-address in a function. If the SSH call does nto respont for
> > 2 seconds I want to kill the process, but if it responds before 2
> > seconds then it
> > shudnt have to wait unnecessarily for 2 seconds.
>
> > here the code i was trying:
>
> [snip]
>
> Why not just specify the connection timeout?
>
> > `ssh -q "$1" /bin/true &> /dev/null &`
>
> Note that -q turns off messages, but it does not prevent the client from
> asking necessary interactive questions... You'd need BatchMode for that.
>
> ssh -o BatchMode=yes -o ConnectTimeout=2 /bin/true > /dev/null
- Previous message: Oli K-u-r-t: "sftp on win"
- In reply to: Darren Dunham: "Re: Forcing SSH to timout after a certain time if it isn't responding"
- Next in thread: Darren Dunham: "Re: Forcing SSH to timout after a certain time if it isn't responding"
- Reply: Darren Dunham: "Re: Forcing SSH to timout after a certain time if it isn't responding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|