LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 04-15-2005, 06:47 AM   #1
tuxtamer
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
"username@hostname"
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.
bye,
tuxtamer.
 
Old 04-15-2005, 07:29 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

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

Is it in format like:
Code:
192.68.0.27    yourcomputer.yourdomain yourcomputer morenamesForYourComuter
192.68.0.43    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).
 
  


Reply


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


All times are GMT -5. The time now is 11:25 AM.

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