Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-15-2005, 06:47 AM   #1
LQ Newbie
Registered: Mar 2005
Location: Hyderabad, India
Posts: 12

Rep: Reputation: 0
how to use the hostname instead of ip address?

hi everyone,
i use red hat 9.
my computer is connected through a LAN.
i use ssh for logging into my computer from a remote computer.
i use the format
"username@ipaddress" for logging in.
but when i use
it says "ssh :LINUX: name or service not known"
i already tried modifying the /etc/hosts and gave my ipaddress in it.
pls help.
thanks in advance.
Old 04-15-2005, 07:29 AM   #2
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
the /etc/hosts is the right place for that.

Is it in format like:
Code:    yourcomputer.yourdomain yourcomputer morenamesForYourComuter    othercomputer.yourdomain othercomputer othernamesForOtherComputer
(with your own ip addresses)

Also be aware that hosts file configuration has to be in the host where you are trying to
connect from. So in practice you have to maintain hosts -lists for every computer in every
computer (alternative for this is to setup a domain name server).


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
MAC Address based hostname hogg85 Linux - Networking 2 06-13-2005 12:51 PM
changing IP address and hostname ashley75 Linux - General 7 05-19-2005 10:26 AM
hostname-------->ip address bruse Linux - Networking 2 04-18-2005 05:08 AM
hostname to IP address bruse Linux - Networking 5 03-29-2005 11:21 PM
From IP address to hostname swmok Linux - Networking 1 08-22-2003 07:26 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:25 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