- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- telnet using script
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
Forums
Discussions
Discussions
Discussions
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
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
03-08-2006 10:13 PM
03-08-2006 10:13 PM
telnet using script
I want to know how to telnet a remote Unix server using a script from Linux server
when I am using a script like this
#!/bin/bash
(echo open 10.101.1.181
sleep 1
echo root
sleep 1
echo passwd )|telnet
then I am getting error "Connection closed by foreign host"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2006 10:17 PM
03-08-2006 10:17 PM
Re: telnet using script
You can get more information from these threads,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=205441
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=893616
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2006 10:21 PM
03-08-2006 10:21 PM
Re: telnet using script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2006 10:53 PM
03-08-2006 10:53 PM
Re: telnet using script
Additionally you can also explore rsh and ssh option.
See man rsh and man ssh.
Hoope that helps.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 08:40 PM
03-09-2006 08:40 PM
Re: telnet using script
Expect is a solution,
Another solution is to user Net::Telnet package (look in CPAN at http://search.cpan.org/~jrogers/Net-Telnet-3.03/)
Here attached a simple example that makes use of this Telnet lib to run and printout result of a command after login is performed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 08:40 PM
03-09-2006 08:40 PM
Re: telnet using script
Expect is a solution,
Another solution is to use Net::Telnet package (look in CPAN at http://search.cpan.org/~jrogers/Net-Telnet-3.03/)
Here attached a simple example that makes use of this Telnet lib to run and printout result of a command after login is performed.