- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to write script for telnet session
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
Community
Resources
Forums
Blogs
- 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
тАО06-29-2004 08:54 PM
тАО06-29-2004 08:54 PM
How to write script for telnet session
I want to write a script ( .sh ) for telnet session and auto login to the system. How to do it ? Please help
- Tags:
- telnet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2004 09:00 PM
тАО06-29-2004 09:00 PM
Re: How to write script for telnet session
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2004 09:02 PM
тАО06-29-2004 09:02 PM
Re: How to write script for telnet session
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=496072
sks
- Tags:
- broken URL link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2004 09:06 PM
тАО06-29-2004 09:06 PM
Re: How to write script for telnet session
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2004 09:17 PM
тАО06-29-2004 09:17 PM
Re: How to write script for telnet session
check this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=496072
Anyway this was posted more times in ITRC forum, try to insert keywords 'telnet script' in ITRC search.
Best regards,
Ettore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2004 09:26 PM
тАО06-29-2004 09:26 PM
Re: How to write script for telnet session
Script:
Telnet ip-address
sleep 5
echo username
sleep 5
echo password
I try this, but it isn't work. Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2004 10:10 PM
тАО06-29-2004 10:10 PM
Re: How to write script for telnet session
But, you'll find that Expect is really what you need, if rsh (or ssh) won't be satisfactory (why ??).
Ant (what make is for C, ant is for Java) has also telnet scripting capabilities).
Cheers
Nicolas
- Tags:
- expect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2004 01:47 AM
тАО06-30-2004 01:47 AM
Re: How to write script for telnet session
use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
Prompt => '/bash\$ $/');
$t->open("sparky");
$t->login($username, $passwd);
@lines = $t->cmd("/usr/bin/who");
print @lines;
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2004 01:06 AM
тАО07-01-2004 01:06 AM
Re: How to write script for telnet session
Download HERE:
http://hpux.cs.utah.edu/hppd/hpux/Tcl/expect-5.41/
#!/usr/bin/expect
spawn telnet
expect "login"
send "USERNAME\r"
expect "Password:"
send "PASSWORD\r"
expect "# "
YOU CAN SEND and Expect commands..
Get the OReilly Book "Expect"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2004 01:08 AM
тАО07-01-2004 01:08 AM