- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problem to send a command to another host
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
Forums
Discussions
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
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
09-07-2001 02:06 AM
09-07-2001 02:06 AM
problem to send a command to another host
I have a problem to execute a remote command from a HP-UX11 box.
BOX1 and BOX2 are both HP-UX11 machines.
From BOX1 i do this command:
( sleep 2
echo root
sleep 2
echo password
sleep 5
echo ls -l
sleep 5
echo exit ) | telnet BOX2
and it work !
I do the same from BOX2 and the result is:
( sleep 2
echo root
sleep 2
echo password
sleep 5
echo ls -l
sleep 5
echo exit ) | telnet BOX1
Trying...
Connected to saturno.
Escape character is '^]'.
Local flow control on
Telnet TERMINAL-SPEED option ON
HP-UX saturno B.11.00 E 9000/879 (tb)
login: root
Password: Connection closed by foreign host.
BOX1, can't do this command to itself !
otherwise, if I type:
telnet BOX1
login: root
password: passwod
it works.
Someone can help me ?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 02:44 AM
09-07-2001 02:44 AM
Re: problem to send a command to another host
your script looks ok. Are you sure there is not typo in the script?
Perhaps there is an extra blank character behind root or the password.
in vi do a :set list to see the end of line. Make sure there are no extra blank characters.
Hope this helps
Regards Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 02:57 AM
09-07-2001 02:57 AM
Re: problem to send a command to another host
Scripts look good. If the login or password were wrong you would get a login incorrect message. Connection closed implies the remote server is closing the connection. Possibilities are the account .profile in their homedir, or /etc/profile. Try renaming the .profile in the home dir to something else temporarily and retry, and if it doesnt work check /etc/profile (or the home dirs .kshrc or .shrc files).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 04:32 AM
09-07-2001 04:32 AM
Re: problem to send a command to another host
Question: Why are you using telnet(1) instead of remsh(1)?
If you must use telnet(1), you may want to have a look at the 'expect' program. As far as I know, 'expect is available from The HP-UX Porting and Archive Centre http://hpux.connect.org.uk
If you are worried about the limited security that remsh(1) provides, then you may want to have a look at ssh. Hopefully others can give pointers to ssh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 05:53 AM
09-07-2001 05:53 AM
Re: problem to send a command to another host
Thanks for yours reply.
I'm sure I have no typo in my cmd.
I try to play with /etc/profile and the .profile in user home directory. The /etc/profile are identical in BOX1 and BOX2.
I try to mv the /home/user/.profile from BOX2 to BOX1 but I have the same problem.
I think I'll use remsh to send my remote command.
Thank's to all !