![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to delete the files from local host to remote host | krishna176 | SUN Solaris | 3 | 03-24-2007 04:48 PM |
| logging to remote server | abey | Shell Programming and Scripting | 6 | 03-21-2006 08:12 PM |
| How to specify the remote host? | redlotus72 | UNIX for Dummies Questions & Answers | 2 | 07-21-2005 05:21 AM |
| FTP - Connection Closed By Remote Host | mouglybean | IP Networking | 1 | 10-26-2004 09:15 AM |
| Delay when logging in remote | alfabetman | UNIX for Dummies Questions & Answers | 8 | 10-08-2001 10:55 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Problem with logging into remote host
Hi All,
I am using a script for remotely logging into a rhost using telnet and shutdown a server. The script is as follows. IP = 10.24.12.23; export IP UNAME = username ; export UNAME PWD = password; export PWD CRDIR = /etc/rc.d/init.d ; export CRDIR echo "logging into remote host" ( telnet $IP << EOF $UNAME # username for logging into rhost $PWD # password for logging cd $CRDIR sh shutdown.sh stop # for shutdowning the server $PWD # password for shutdowning the server logout EOF ) >> log.$$ When I execute this script, I am getting an error saying that "unknown host". Can you please let me know what the problem is? If you know any other way of logging into a remote host. Can you please let me know ASAP. THanks in Advance, Patil. |
|
||||
|
Problem while logging into a remote host using telnet
Hi,
Thanks for the reply, but in the script whatever I have written has not blank spaces. It is returning an error "Closed by a foreign host" Please let me know if anyone has faced this error and what was the solution. Thanks in advance, Patil. |
|
||||
|
You cant use redirected input with telnet ... you need to use a tool like expect: http://expect.nist.gov/
Last edited by Unbeliever; 06-13-2006 at 06:02 AM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|