[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to check the server can be connected or not



2012/2/3 lina <lina.lastname@gmail.com>:
> Hi,
>
> a server is closed, but will start in future, sooner or later,
>
> I wish to access in the first time it's open.
>
> I tried:
>
> while ( ssh server )
> do
> sleep 60
> done
>
> wall < server_open.txt
>
> actually I don't know how to write the while part,
>
> thanks for suggestions,
>
> Best regards,
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] CAG9cJm=CNU9tU+8vE0509LaUxB+bmiyiR5-g2ceuWwq6Tk9=-g@mail.gmail.com">http://lists.debian.org/[🔎] CAG9cJm=CNU9tU+8vE0509LaUxB+bmiyiR5-g2ceuWwq6Tk9=-g@mail.gmail.com
>

Hi,

My 5 cents:

watch -n 60 ssh your server

watch will try to ssh your server every 60 sec.

If the ssh daemon is up and running you will get the password prompt
If it is nor you will get an error message

Best Regards

--------------------------------------------------------------------------------------
Juan Sierra Pons                                 juan@elsotanillo.net
Linux User Registered: #257202       http://www.elsotanillo.net
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
--------------------------------------------------------------------------------------


Reply to: