- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- non-interactive telnet
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
04-11-2003 12:39 AM
04-11-2003 12:39 AM
I need to run non-interactive telnet session to HP-UX 11.
I try to use command
(sleep 3;echo oracle;sleep 3; echo
When I connect to server with HPUX 10.20 this command works fine but when I try to connect to server with HPUX 11.0, I get
# ./tn.sh
Trying...
Connected to atest.
Escape character is '^]'.
Local flow control on
Telnet TERMINAL-SPEED option ON
HP-UX ATEST B.11.00 A 9000/800 (te)
login: root
Password: Connection closed by foreign host.
# Trying...
Connected to atest.
Escape character is '^]'.
Local flow control on
Telnet TERMINAL-SPEED option ON
HP-UX ATEST B.11.00 A 9000/800 (te)
login: root
Password: Connection close by foreigh host
I tried to change timeout value for telnetd daemon (-z option)in inetd.conf file but result was same.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 01:23 AM
04-11-2003 01:23 AM
Re: non-interactive telnet
If I remember correctly there is a script here:-
http://forums.itrc.hp.com/cm/QuestionAnswer/0,,0x026250011d20d6118ff40090279cd0f9,00.html
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 01:25 AM
04-11-2003 01:25 AM
Solutiontake a look at the expect software (http://expect.nist.gov/)
Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications
Regards
Rainer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 01:31 AM
04-11-2003 01:31 AM
Re: non-interactive telnet
Have you looked at rlogin for this task.
Man rhosts and man rlogin.
I would also watch the security aspect as I see you are trying to login at root level. Test on a test server as if it goes wrong on your script it can make a mess of the server you are loging in to.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 02:21 AM
04-11-2003 02:21 AM
Re: non-interactive telnet
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2003 07:30 AM
04-11-2003 07:30 AM
Re: non-interactive telnet
Try adding \r at the end as per the following script (I've cleaned it up by replacing the IP address, login and password and removed the actual commands but we use it every day):
REMOTE=A.B.C.D
(sleep 5
echo "\r"
sleep 1
echo "login\r"
sleep 1
echo "password\r"
sleep 5
echo "some command\r"
sleep 1
echo "another command\r"
sleep 5
echo "q\r"
sleep 1
echo "exit\r"
echo "\r") |telnet $REMOTE
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2003 08:57 PM
04-13-2003 08:57 PM
Re: non-interactive telnet
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA
fpr the HP-supported version, or
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/openssh-3.6.1p1/
if you want to roll your own copy.
You can set up private/public keys for root, and run commands on the remote host via:
ssh -l root -i /path/to/root/private_id /some/command
More secure than embedding a root password in a script, plus you get encryption across the network.
See man pages for ssh, ssh-keygen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 04:55 AM
04-14-2003 04:55 AM
Re: non-interactive telnet
autoexpect -f
then proceed to do what you want to. when done it generates a script for you. you will need to edit this script and remove some of the extraneous text such as the time and date... I'm attaching an example script with my username, password, and hostname changed.