LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-11-2005, 11:52 AM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
ssh using hostnames, not IPs


How come when using putty or cygwin(windows ssh clients), I am able to use my host name like this
ssh shane@freevo
it prompts me for a password, and then I can log in.

when I try to log into the machine from my bsd box(I think When I ran linux it acted the same way) with the same command I get this error.
Code:
su-2.05b# ssh shane@freevo
ssh: freevo: hostname nor servname provided, or not known
I have always had to use ips, hostnames have never worked for me using *nixs. I guess I was surprised that hostnames worked with both cygwin and puttys ssh clients.
 
Old 04-11-2005, 11:55 AM   #2
kevinatkins
Member
 
Registered: Jan 2004
Location: cheshire, uk
Distribution: Ubuntu Hoary
Posts: 605

Rep: Reputation: 33
try adding the hostnames to your /etc/hosts file - there should be examples in the file of correct syntax.
 
Old 04-11-2005, 12:03 PM   #3
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I am pretty sure my /etc/hosts is set up correctly.

What mechanism is allowing my windows ssh clients to have no problem using hostnames.
 
Old 04-11-2005, 12:39 PM   #4
BinaryBob
Member
 
Registered: Aug 2002
Posts: 117

Rep: Reputation: 15
It could be one several things. The /etc/hosts entries would definatalye resolve the issue. But of course if the IPs of the hosts oyu want to connect to change, you have to manually edit them again.

Do you have a router, runnign DHCP? If so what kind. - It could be performing UPnP type services for windows, not letting linux use it (very unlikely)

Are the Linux machines running samba? - Related to windows beign able to access through the WINS protocol, kind of like a second DNS.

Ok, so anyway, show us the /etc/hosts file, and how bout /etc/resolv.conf too. Might help us find some solutions.
 
  


Reply



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
IPCop : Limit incoming traffic to selected IPs and hostnames lothario Linux - Networking 0 01-28-2005 06:35 PM
how to define a specific range of IPs and/or multiple IPs in an iptables rule?... TheHellsMaster Linux - Security 9 09-20-2004 10:06 AM
SSH localhost is fine, IPs won't connect zzero Linux - Networking 4 03-24-2004 01:00 PM
eth0:9 incorrect IPs ,and eth0 not IPs WannaLearnLinux Linux - Networking 10 10-26-2003 08:50 PM
Can ping MyDNS1.FQDN and IPs but no other hostnames? leecason Linux - Networking 3 10-06-2003 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:45 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration