![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disconnecting a telnet session | cooldude | UNIX for Dummies Questions & Answers | 14 | 12-09-2007 04:21 PM |
| How to check sqlplus command is successfull or not in HP UX? | plaban.rout | HP-UX | 5 | 11-20-2007 02:48 AM |
| Telnet Session to AIX | bluebee | UNIX for Dummies Questions & Answers | 1 | 08-07-2007 12:19 PM |
| Telnet Session | pathanjalireddy | Shell Programming and Scripting | 6 | 04-06-2005 07:41 AM |
| Telnet session does not expire | deepsteptom | Shell Programming and Scripting | 1 | 08-03-2004 08:48 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
check for successfull telnet session
In either case using ksh or tcl, how can I check that I have a successfule telnet session and am being prompted with a tacacs login prompt ?
DOIT () { sleep 2 echo "<tacacs name >" sleep 1 echo "<password>" echo "en" sleep 1 echo "<enable password>" echo "term length 512" echo "show config" echo "term length 50" echo "disable" echo "exit" } while read x do clear DOIT | telnet $x done ___________________ #!/usr/local/bin/expect -- # log_user 0 spawn telnet expect "telnet>" send "open [lindex $argv 0]\n" expect "e: " send "[lindex $argv 1]\n" expect "d: " send "[lindex $argv 2]\n" expect ">" send "ena\n" expect "d: " send "<enable password>" expect "#" interact |
|||
| Google UNIX.COM |
| Forum Sponsor | ||
|
|