hi all,
i wanted to write a ksh script to telnet to another server on a particular port every 5 mins in order to send out an alert if that server went down.
how do i read the response that comes back when the server is down i.e "telnet: Unable to connect to remote host: Connection refused"
hey thanks for the reply, just came to mind that a telnet session if left open will get automatically shut/closed by the network. is there a better way of doing this rather than using telnet ??
telnet and ftp uses different port, when telnetd is running, there is no guarantee that ftpd should be running or vice versa,
so ping on a telnet port is another alternative
Ex. ping is not service test. If you like to test some tcp/ip service, use that service = only correct method to check service.
And use ip and port/service number - test only service, not own dns, ...
Create socket ex. socket.sh 111.111.111.111 23