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 05-03-2011, 08:50 AM   #1
Registered: Apr 2011
Posts: 71

Rep: Reputation: 0
Can't contact machine by its hostname


I just upgraded to Ubuntu 11.0.4 (from 10). In my /etc/hostname file, I defined my machine's name, "my-machine". From the server, I'm able to SSH to myself,

ssh dave@my-machine

However, from another machine in the same network, I'm not able to SSH

davea-mbp2:systems davea$ ssh dave@my-machine
ssh: Could not resolve hostname my-machine: nodename nor servname provided, or not known
However, I'm able to SSH in using the machine's IP address. Any ideas how I get my machine name recognized on the network?

Thanks, - Dave
Old 05-03-2011, 08:58 AM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
Add it to the config on your router or DNS server? Or Add my-machine to your /etc/hosts file on each 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
I don't want my machine to contact dhcp rohit.dhaval1 Linux - Newbie 3 11-25-2010 05:32 PM
How do i use a hostname given by No-IP as my machine name? z-vet Linux - Networking 3 10-22-2004 08:06 PM
Getting hostname of remote machine with gethostbyaddr() thomjakub Linux - Networking 4 03-06-2004 09:08 AM
Can't ping linux machine by hostname jdklein1975 Linux - Networking 3 02-26-2003 01:49 PM
How to get another machine's hostname? afpe Linux - Networking 4 01-27-2003 07:59 PM > Forums > Linux Forums > Linux - Newbie

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