GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Telnet from NClass to router and execute scrip...
Operating System - HP-UX
1849566
Members
6774
Online
104044
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 07:32 AM
12-18-2001 07:32 AM
I need to telnet from my NClass to a router, login, execute a few commands, and exit. I can connect to the router via IP but it seems that I lose control of the session at that point. No line in my script beyond the telnet IP command executes. When the password times out and control returns to the NClass, the rest of the script executes. This is the sequence of my script.
telnet IP address
password
router name> en
password
command1
command2
command3
exit
How do I get the rest of my script to actually execute on the router?
Thank you very much for your help.
Robb
telnet IP address
password
router name> en
password
command1
command2
command3
exit
How do I get the rest of my script to actually execute on the router?
Thank you very much for your help.
Robb
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 07:36 AM
12-18-2001 07:36 AM
Re: Telnet from NClass to router and execute script
Get "expect" and "tcl/tkl".
http://hpux.asknet.de/hppd/hpux/Tcl/expect-5.33/
http://hpux.asknet.de/hppd/hpux/Tcl/tcl-8.2.1/
http://hpux.asknet.de/hppd/hpux/Tcl/tk-8.2.1/
live free or die
harry
http://hpux.asknet.de/hppd/hpux/Tcl/expect-5.33/
http://hpux.asknet.de/hppd/hpux/Tcl/tcl-8.2.1/
http://hpux.asknet.de/hppd/hpux/Tcl/tk-8.2.1/
live free or die
harry
Live Free or Die
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 07:37 AM
12-18-2001 07:37 AM
Solution
Hi Robb,
We had a discussion on this sometime back. I would suggest to use expect/TCL-TK as non-interactive telnet is not very reliable due to timing issues.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x54e2c6af36b7d5118ff10090279cd0f9,00.html
It's not very difficult to write an expect script. There are plenty of examples the come with it.
http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.31/
Check out the dependencies. You need to download TCL/TK also.
-Sri
We had a discussion on this sometime back. I would suggest to use expect/TCL-TK as non-interactive telnet is not very reliable due to timing issues.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x54e2c6af36b7d5118ff10090279cd0f9,00.html
It's not very difficult to write an expect script. There are plenty of examples the come with it.
http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.31/
Check out the dependencies. You need to download TCL/TK also.
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 07:40 AM
12-18-2001 07:40 AM
Re: Telnet from NClass to router and execute script
Hi,
Try using 'expect'
You can download it from here..
http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.31/
-USA..
Try using 'expect'
You can download it from here..
http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.31/
-USA..
Good Luck..
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP