1

I realize this may be a weird thing to ask and that it doesn't make much sense, so I will clarify the issue here. It is a very bizarre issue that I do not understand why is happening and I do not know how to fix.

Here's the scenario: My Mac's user name is andyibanez. I am also the owner of https://www.andyibanez.com. I want to configure my website to use a different subdomain for FTP, SSH, and all those goodies, called ftp, so my ftp host will be ftp.andyibanez.com. So I created the DNS settings and tried to use them.

Here's the weird thing, though: When I open the Terminal app and type ssh andyibanez@ftp.andyibanez.com, the operation fails immediately, it doesn't even try to connect to the internet. I know it doesn't because it fails as soon as I send the command by pressing the Enter key.

ssh: Could not resolve hostname ftp.andyibanez.com: nodename nor servname provided, or not known

All apps I have tried to use SSH and FTP have failed immediately. That includes Cyberduck and Transmit.

Trying to ping ftp.andyibanez.com doesn't work, either.

ping: cannot resolve ftp.andyibanez.com: Unknown host

At this point you may be thinking that I have misconfigured my DNS settings. Nope, I am 100% I didn't, for the following reasons:

  • All operations in regarding that host fail immediately.
  • I have actually tried a different computer (that doesn't have andyibanez as a user) and it worked fine. I was also able to connect fine using the Transmit iOS app.
  • I set up another domain as ftp.myotherdomain.com with the same things as ftp.andyibanez.com and it works fine. I can connect to it with no problems.

Of course, I have the easy workaround that I can connect with this computer by setting a different subdomain or even using the naked domain. So I can connect to SSH. I am asking this because I am really curious as to why this happens.

  • Where did you create the DNS Settings? If you modified your Zone File, it may take a while for the changes to take effect. Also, try to change your DNS-Server to google (8.8.8.8) to see if there is a problem with your current DNS-Server Settings – J.C. Oct 31 '15 at 20:29
  • I use Namecheap's DNS server for my configuration. Locally I connect to OpenDNSs DNS. – Andy Ibanez Oct 31 '15 at 21:29
2

What does dig ssh.andyibanez.com return to you? DNS is not immediate action and there is some TTL. If you did the DNS change and started trying immediately, you or your DNS provider has the records cached.

The easiest way is to way few hours and it will start work (I can resolve these hostnames from my place and initiate ssh connection).

Other way around is to flush your local DNS cache, probably with something like this:

sudo killall -HUP mDNSResponder
  • I should probably clarify that when I was working on the other site the DNS chances were almost immediate. I can connect to ssh.andyibanez.com because I configured it to be my workaround host for ftp.andyibanez.com. It's funny, but only ftp.andyibanez.com fails. Anything else I configure the DNS for works almost instantly. – Andy Ibanez Oct 30 '15 at 23:39
  • @AndyIbanez: DNS caching is complicated, and can be very tricky to debug. It's entirely possible to get immediate updates on one client, and multi-hour delays on another (even identically configured client). That's why more direct probes like dig (which bypasses the client-side cache but not the server cache) can help isolate problems. – Gordon Davisson Nov 1 '15 at 1:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .