Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


Closed Thread
  Search this Thread
Old 06-13-2006, 05:29 AM   #1
LQ Newbie
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
Logging into a remote host automatically through shell script

Hi Friends,

I have raised this issue previously. When I use the following script, I am getting an error "unknown host"

(telnet << EOF
hello #username
hello123 # password
cd /base/scripts # change the directory
sh shutdown stop # shell to shutdown the server
hello123 # password
) >> log.$$

When I run the script, I am getting unknown host error. But when I manually try to login into the host, it was succesfully login. I have tried using expect also, but it was giving the same error. If anyone knows the usage of ssh, can you please give me a sample script, so that I can go ahead changing the telnet.

Thanks in advance,
Old 06-13-2006, 06:23 AM   #2
Registered: May 2001
Posts: 29,279
Blog Entries: 55

Rep: Reputation: 3515Reputation: 3515Reputation: 3515Reputation: 3515Reputation: 3515Reputation: 3515Reputation: 3515Reputation: 3515Reputation: 3515Reputation: 3515Reputation: 3515
I have raised this issue previously.

Hello there and welcome to LQ.
Since you're busy trying to fix your problems you may not be aware how things work with respect to "good" netizenship in general and LQ specifically. Questions that aren't answered yet remain in an "auto bump" list for a period of time. This should ensure it gets the exposure needed. If you however think your question deserves more attention you can bump the thread yourself. Making a new thread, even slightly changed, for the same question is an unwanted practice here no matter what your reasoning behind it is. LQ is full of members that want to help out, but it is not similar to what you may expect of say paid response. If you need 24/7 urgency response consider hiring a local GNU/Linux guru. So please stick with your other thread which has got one reply, so be polite enough to reply there. This thread being a duplicate, is closed.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run shell script as root automatically elempoimen Linux - Software 8 06-20-2010 01:24 AM
Ssh or logging from shell script Alek Linux - General 5 09-24-2003 10:30 AM
running a script automatically when Logging out? hamster Linux - General 2 06-03-2003 08:49 PM
shell script for logging threadhead Linux - General 8 12-27-2002 03:59 PM
SYSLOG - logging to Remote Host dvong3 Linux - Networking 4 09-24-2002 07:14 AM

All times are GMT -5. The time now is 12:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration