| Author |
Message |
ngtech
Joined: 10 Feb 2010
Posts: 2
|
| Posted: Wed Feb 10, 2010 1:13 am Post subject: SSH with multiple hostnames |
|
|
Hi
I've got sshd working on my ubuntu server, but it does not work for all of my domains.
It works for the IP address, as well as other.com, and www.main.com, but not main.com - they're all running off the same IP.
For main.com it tells me my password is incorrect. If you ping main.com it is pinging the same IP as all the other domains are on and is seen in my /etc/hosts.
In my /etc/hosts they are all defined and point to the same hostname that is found in /etc/hostname.
I set it all up yesterday. Is there something I need to do to refresh the caches on my client or on the server?
How should I be setting the server up for multiple hosts over ssh?
Thanks
Tim |
|
| Back to top |
|
ngtech
Joined: 10 Feb 2010
Posts: 2
|
| Posted: Wed Feb 10, 2010 4:07 am Post subject: Ping showing "incorrect" routing |
|
|
| Ok, the problem is sorted. It turns out that even though ping was showing the linode IP my DNS records weren't all pointing to the linode IP, very strange. |
|
| Back to top |
|
Guspaz
Joined: 26 May 2009
Posts: 1030
Location: Montreal, QC
|
| Posted: Wed Feb 10, 2010 4:09 pm Post subject: |
|
|
| Getting sshd working on Ubuntu is about as complex as executing "sudo apt-get install openssh-server", and everything just works. I thought that it was already installed by default on linodes, though. |
|
| Back to top |
|
sednet
Joined: 17 Mar 2004
Posts: 157
Location: Europe
|
| Posted: Thu Feb 11, 2010 4:20 am Post subject: Re: Ping showing "incorrect" routing |
|
|
ngtech wrote: Ok, the problem is sorted. It turns out that even though ping was showing the linode IP my DNS records weren't all pointing to the linode IP, very strange.
Check your forward and reverse DNS match.
Lookup your hostname and you should get your IP.
Lookup your IP and you should get your hostname. |
|
| Back to top |
|
funkytastic
Joined: 10 Aug 2008
Posts: 76
Location: ~$
|
| Posted: Thu Feb 11, 2010 6:14 pm Post subject: |
|
|
A semi-related tip, since I see this a lot:
You don't need to use ping to resolve a hostname or IP address. Use a dns tool like host or dig. Ping performs a DNS lookup, but then proceeds to send packets at the target. This is entirely unrelated to resolving the target's hostname.
Code: $ host newark3.linode.com
newark3.linode.com has address 207.192.68.8
$
|
|
| Back to top |
|
kmweber
Joined: 08 Feb 2010
Posts: 16
|
| Posted: Thu Feb 11, 2010 8:25 pm Post subject: Re: SSH with multiple hostnames |
|
|
ngtech wrote:
and www.main.com, but not main.com - they're all running off the same IP.
This is a massive misuse of the domain name system. If there are subdomains beneath a certain higher-level domain, then the higher-level domain should not have an address associated with it. |
|
| Back to top |
|
vonskippy
Joined: 27 Dec 2009
Posts: 410
Location: Colorado, USA
|
| Posted: Thu Feb 11, 2010 8:33 pm Post subject: |
|
|
I'm confused why you would need such a setup.
If all domain and subdomains resolve to the same IP, what difference does it make?
It's not like the ssh daemon cares how you got there. |
|
| Back to top |
|
Stever
Joined: 07 Dec 2007
Posts: 329
Location: NC, USA
|
| Posted: Thu Feb 11, 2010 8:36 pm Post subject: Re: SSH with multiple hostnames |
|
|
kmweber wrote: ngtech wrote:
and www.main.com, but not main.com - they're all running off the same IP.
This is a massive misuse of the domain name system. If there are subdomains beneath a certain higher-level domain, then the higher-level domain should not have an address associated with it.
According to who?
Code: $ host -t A icann.org
icann.org has address 192.0.32.7
$ host -t A www.icann.org
www.icann.org has address 192.0.32.7
$ host -t A linode.com
linode.com has address 67.18.186.61
$ host -t A www.linode.com
www.linode.com has address 67.18.186.61
|
|
| Back to top |
|
sednet
Joined: 17 Mar 2004
Posts: 157
Location: Europe
|
| Posted: Fri Feb 12, 2010 4:44 am Post subject: Re: SSH with multiple hostnames |
|
|
kmweber wrote: ngtech wrote:
and www.main.com, but not main.com - they're all running off the same IP.
This is a massive misuse of the domain name system. If there are subdomains beneath a certain higher-level domain, then the higher-level domain should not have an address associated with it.
It's perfectly valid to have one IP for a domain and another for a subdomain. |
|
| Back to top |
|
rsk
Joined: 24 Nov 2009
Posts: 283
|
| Posted: Fri Feb 12, 2010 6:05 am Post subject: |
|
|
| Also, http://no-www.org :P |
|
| Back to top |
|
kmweber
Joined: 08 Feb 2010
Posts: 16
|
| Posted: Sat Feb 13, 2010 10:42 am Post subject: Re: SSH with multiple hostnames |
|
|
sednet wrote: kmweber wrote: ngtech wrote:
and www.main.com, but not main.com - they're all running off the same IP.
This is a massive misuse of the domain name system. If there are subdomains beneath a certain higher-level domain, then the higher-level domain should not have an address associated with it.
It's perfectly valid to have one IP for a domain and another for a subdomain.
It's "valid" in the sense that "it'll probably work," but not in the sense that "it fits in with the conceptual, hierarchical view of the domain name system." |
|
| Back to top |
|
glg
Joined: 09 Jan 2009
Posts: 452
|
| Posted: Sat Feb 13, 2010 10:49 am Post subject: Re: SSH with multiple hostnames |
|
|
kmweber wrote: It's "valid" in the sense that "it'll probably work," but not in the sense that "it fits in with the conceptual, hierarchical view of the domain name system."
Seriously? Just stop. You're making yourself look like a fool. Using the same IP for both a domain and a subdomain is not a "massive misuse" of DNS, nor will it "probably work", it does work, just fine. In fact, it works just fine to have hundreds of domains and hundreds more subdomains pointing to the same IP. |
|
| Back to top |
|
kmweber
Joined: 08 Feb 2010
Posts: 16
|
| Posted: Sat Feb 13, 2010 10:58 am Post subject: Re: SSH with multiple hostnames |
|
|
glg wrote: kmweber wrote: It's "valid" in the sense that "it'll probably work," but not in the sense that "it fits in with the conceptual, hierarchical view of the domain name system."
Seriously? Just stop. You're making yourself look like a fool. Using the same IP for both a domain and a subdomain is not a "massive misuse" of DNS, nor will it "probably work", it does work, just fine. In fact, it works just fine to have hundreds of domains and hundreds more subdomains pointing to the same IP.
Please respond to what I actually said, and not what you might like to pretend I said. I never denied that what you describe would "work" in a technical sense. What I am saying is that having a subdomain and its parent domain resolve to an address at all, regardless of whether or not they're the same, is not valid regardless of whether or not it works, because it's inconsistent with the conceptual framework of the domain name system, period. |
|
| Back to top |
|
Xan
Joined: 08 Feb 2004
Posts: 562
Location: Austin
|
| Posted: Sat Feb 13, 2010 11:35 am Post subject: Re: SSH with multiple hostnames |
|
|
kmweber wrote: Please respond to what I actually said, and not what you might like to pretend I said. I never denied that what you describe would "work" in a technical sense. What I am saying is that having a subdomain and its parent domain resolve to an address at all, regardless of whether or not they're the same, is not valid regardless of whether or not it works, because it's inconsistent with the conceptual framework of the domain name system, period.
I'm not sure exactly what the problem is that you have with that. I am sure that you're the first and only person I've ever seen who has this issue. Perhaps the problem is you and not the way people use DNS? |
|
| Back to top |
|
sweh
Joined: 13 Apr 2004
Posts: 548
|
| Posted: Sat Feb 13, 2010 11:46 am Post subject: Re: SSH with multiple hostnames |
|
|
Xan wrote: I'm not sure exactly what the problem is that you have with that. I am sure that you're the first and only person I've ever seen who has this issue. Perhaps the problem is you and not the way people use DNS?
I wouldn't be surprised if he was also against cross-domain CNAME records as well! |
|
| Back to top |
|
| |