Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Putty can't connect over SSH to hostname, IP connection work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rutherford
n00b
n00b


Joined: 13 Dec 2011
Posts: 31

PostPosted: Fri Aug 03, 2012 2:23 pm    Post subject: Putty can't connect over SSH to hostname, IP connection work Reply with quote

I have a gentoo box on my homenetwork that I'm trying to SSH into via W7 client but although I can do it via IP address when I try the hostname it won't find it. Also get a DNS error

Code:
socket.gaierror: [Errno -2] Name or service not known


when I try to startup a http server on the gentoo. I assume as this is a dns error that these issues are related.

It was working a few months ago when I last logged in so I'm not sure what's changed in the meantime?

Ping fails on supplying hostname too but again, pinging the IP works fine.

On my router firmware I have port forwarding setup and use DynDNS (no-ip.org) to connect to the linux hostname for ssh and http. When I try to connect via ssh using the external DynDNS name it works fine, indicating the router, ie DHCP server, can resolve the gentoo hostname fine. The windows7 box is said up for DHCP, as was Gentoo.

So it appears router resolves hostname but not my windows box/the linux http server itself?

Edit: I added the hostname/static ip record to my etc/hosts and now the gentoo web server starts fine, indicating name resolution was the issue. But as I've never had to do this before I'm wondering why my home network machines aren't using DHCP to look them up from the router when that's how they got their own assigned addresses?

The only change in my home network config since the last time I booted gentoo has been a new router (upgraded to BT Infinity fibre optic broadband in the last month). It had no problems with name resolution of either the windows 7 or gentoo machines and DHCP address assignment appeared to 'just work' as it should.
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1376
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Fri Aug 03, 2012 2:48 pm    Post subject: Reply with quote

Sounds to me like the new router you mentioned that you bought might not be configuring your DHCP clients with the router as a DNS server, and instead it is just passing your ISP DNS servers on to your LAN DHCP clients. The result is that your LAN clients cannot resolve one another, but anything outbound on the internet still resolves. You should be able to check this pretty easily.
_________________
mcgruff wrote:
I can't promise to be civil.
Back to top
View user's profile Send private message
rutherford
n00b
n00b


Joined: 13 Dec 2011
Posts: 31

PostPosted: Fri Aug 03, 2012 3:35 pm    Post subject: Reply with quote

Had a quick Google and apparently it's not possible to change DNS settings on BT Home Hub 3 (my router). Static IPs though so I guess only option is to set hostfiles manually.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum