- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: telnet connection closed by foreign 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
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
тАО02-07-2002 11:52 AM
тАО02-07-2002 11:52 AM
#!/usr/bin/sh
telnet server1.faq.com 4200 <<-END
login testuser
status
exit
END
But I get the following on Solaris 2.6:
Trying ...
Connected to server1.faq.com.
Escape character is '^]'.
Connection closed by foreign host.
I can manually do:
$ telnet server1.faq.com 4200
and it works fine.
Any suggestions?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 12:13 PM
тАО02-07-2002 12:13 PM
Re: telnet connection closed by foreign host.
I don't know if the - syntax is supported on Solaris or not.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 12:27 PM
тАО02-07-2002 12:27 PM
Re: telnet connection closed by foreign host.
http://www.sun.com/bigadmin/
I found in the sh man page for Solaris 7 that the <<- syntax is supported (at least in 7). I still don't know about 2.6.
I did say I was guessing!
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 12:40 PM
тАО02-07-2002 12:40 PM
Re: telnet connection closed by foreign host.
Can there be some setting that is different on Solaris?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 12:44 PM
тАО02-07-2002 12:44 PM
Re: telnet connection closed by foreign host.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:01 PM
тАО02-07-2002 01:01 PM
Re: telnet connection closed by foreign host.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:16 PM
тАО02-07-2002 01:16 PM
Re: telnet connection closed by foreign host.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:25 PM
тАО02-07-2002 01:25 PM
Re: telnet connection closed by foreign host.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:28 PM
тАО02-07-2002 01:28 PM
Re: telnet connection closed by foreign host.
$ telnet server1.faq.com 4200 <<-END
login testuser
status
exit
END
Perhaps you can cut and paste your results for us.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:32 PM
тАО02-07-2002 01:32 PM
Re: telnet connection closed by foreign host.
> login testuser
> status
> exit
> END
Trying 10.5.8.60...
Connected to server1.faq.com.
Escape character is '^]'.
Connection closed by foreign host.
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:35 PM
тАО02-07-2002 01:35 PM
Re: telnet connection closed by foreign host.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:39 PM
тАО02-07-2002 01:39 PM
Re: telnet connection closed by foreign host.
$ telnet server1.faq.com 4200 <<-END
> login testuser
> status
> exit
> END
Trying...
Connected to server1.faq.com.
Escape character is '^]'.
<9FB1257C34542A9770302F2997DD9D1E4BA039A9@server1.faq.com>
OK
* 4073 messages queued
* 31 current incoming SMTP associations
* 88 current outgoing SMTP associations
* 0 current cached SMTP associations
* 1 current manager associations
OK
OK Bye
Connection closed by foreign host.
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:40 PM
тАО02-07-2002 01:40 PM
Re: telnet connection closed by foreign host.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 01:48 PM
тАО02-07-2002 01:48 PM
Re: telnet connection closed by foreign host.
$ sleep 5 | telnet server1.faq.com 4200 <<-END
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2002 07:10 PM
тАО02-07-2002 07:10 PM
SolutionMaybe you can try this script:
# here hostname is the name of the remote machine
# username is the name of the user
# password is the password of the user username
REMOTE=hostname #or IP address
(sleep 5
echo username
sleep 5
echo password
sleep 15
echo "ls -ald /tmp" #Your command
sleep 5
echo exit) |telnet $REMOTE
I had tested it on my HP-UX and Solaris Server before.
Hope this helps.
Kenny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2002 06:30 AM
тАО02-08-2002 06:30 AM