LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   SSH working via IP address, but not host? (http://www.linuxquestions.org/questions/linux-networking-3/ssh-working-via-ip-address-but-not-host-786736/)

bluesword1969 02-03-2010 01:53 PM

SSH working via IP address, but not host?
 
This is a fun one (x used in place of real IP's and hostnames):

Code:

$ host 134.174.xxx.xx
xx.xx.174.134.in-addr.arpa domain name pointer xxx.xxx.xxx.com.

$ host xxx.xxx.xxx.com
xxx.xxx.xxx.com has address 134.174.xxx.xx

$ nslookup xxx.xxx.xxx.com
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
Name: xxx.xxx.xxx.com
Address: 134.174.xxx.xx

$ ssh -p 22 someuser@xxx.xxx.xxx.com
ssh: connect to host xxx.xxx.xxx.com port 22000: Connection timed out

... however, logging in via IP address:

Code:

$ ssh -p 22 someuser@134.174.xxx.xx
someuser@134.174.xxx.xx's password:

... works fine.

Any idea what's going on here?

acid_kewpie 02-03-2010 02:03 PM

has to be something within DNS, add a few -v's to the ssh command line and you'll be able to see what IP it does try to connect to after the name resolution.

bluesword1969 02-03-2010 02:11 PM

Quote:

Originally Posted by acid_kewpie (Post 3851140)
has to be something within DNS, add a few -v's to the ssh command line and you'll be able to see what IP it does try to connect to after the name resolution.

Hey acid. :-)

Don't you hang out in IRC or Gentoo forums, or something? :-)

Anyway, I shall give that a go. Weird stuff, that's for sure.

acid_kewpie 02-03-2010 02:13 PM

I used to, not for a few years now. Mainly here or b3ta.com

bluesword1969 02-03-2010 02:30 PM

Huh.

Check this out:

http://pastebin.com/m641a2450

acid_kewpie 02-03-2010 02:43 PM

Hmmm, well that's VERY strange. I would look to run tcpdump to 1) watch the TCP packet for the connection and see the destination address for sure, and 2) See the DNS query to see what it actually returns.

bluesword1969 02-03-2010 02:52 PM

Quote:

Originally Posted by acid_kewpie (Post 3851159)
I used to, not for a few years now. Mainly here or b3ta.com

P.S. Every time I try out the 'distro chooser' in your sig, I always but always get Gentoo or Slackware. :-)


All times are GMT -5. The time now is 03:56 PM.