automating telnet login
From: henri (henri_yudha_at_bca.co.id)
Date: 05/31/04
- Previous message: Shailendra Dawane: "nis+ error"
- In reply to: Shailendra Dawane: "nis+ error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: <sunmanagers@sunmanagers.org> Date: Mon, 31 May 2004 15:25:12 +0700
Hi gurus ..
I'm try to automating telnet like this :
%telnet 10.222.222.22 99999
telnet> Trying 10.222.222.22...
Connected to 10.222.222.22.
Escape character is '^]'.
Available Services:
ASCII EXIT
And i must to type the ASCII manually.
So i've made the script scriptTelnet.sh :
#!/bin/sh
host=10.222.222.22
port=99999
ASCII=ASCII
echo open ${host} ${port}
sleep 3
echo ${ASCII}
sleep 3
------------------------
When i run the script :
% ./scriptTelnet | telnet > Log.txt
It's only back to prompt with Connection closed by foreign host.
What is the problem ? and how to fix it ?
Because i want to use the Log.txt file for logger.
Best regards,
Henri
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Previous message: Shailendra Dawane: "nis+ error"
- In reply to: Shailendra Dawane: "nis+ error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|