![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disconnecting a telnet session | cooldude | UNIX for Dummies Questions & Answers | 14 | 12-09-2007 08:21 PM |
| How to check sqlplus command is successfull or not in HP UX? | plaban.rout | HP-UX | 5 | 11-20-2007 06:48 AM |
| Telnet Session to AIX | bluebee | UNIX for Dummies Questions & Answers | 1 | 08-07-2007 03:19 PM |
| Telnet Session | pathanjalireddy | Shell Programming and Scripting | 6 | 04-06-2005 10:41 AM |
| Telnet session does not expire | deepsteptom | Shell Programming and Scripting | 1 | 08-03-2004 11:48 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|