I have enabled ssh on one of my computer at home, so I can get to it from my main IP.

No I have a domain where I forward it to my ip. Lets say this website is called

melikecandycoveredfrogs.com mapped to http://myip/

I am able to run

ssh myip and sucessfully connect but when i try ssh melikecandycoveredfrogs.com it doesn't seem to work. I have the ports forwarded and everything.

How can I achieve this? does the http:// cause the issue?

Please and thank you.


SSH is not HTTP, so discussion of your website is not relevant (and yes, passing http:// to ssh will confuse it).

When you say "mapped to", I don't know if you mean that:

  • melikecandycoveredfrogs.com is an A record pointing to (assuming is your IP address)
  • melikecandcoveredfrogs.com uses a META REDIRECT to direct the browser to OR
  • You have an A record "myip" pointing at, and melikecandcoveredfrogs.com is a CNAME[1] pointing at the "myip" record
  • You're doing some kind of NAT or portforwarding on the machine that melikecandycoveredfrogs.com points to in order to direct traffic to the myip machine

The first and third should work fine, the second won't (ssh is not http, your ssh client won't understand an HTTP redirect).

The fourth option could potentially work; if you've remembered to forward port 22, if you've used the appropriate combination of DNAT and SNAT[1]

Can you post the output of "ssh -v melikecandycoveredfrogs.com" (with hostnames/usernames/IPs altered) so we can see what's going wrong?

[2] DNAT will always be required.

If the return traffic from myip back to the source of your connection passes through melikecandycoveredfrogs.com on the way, melikecandycoveredfrogs.com gets a chance to do the required NAT on the way back out as well.

If the traffic doesn't normally pass through melikecandycoveredfrogs.com though, you'll end up with your source machine making a connection to melikecandycoveredfrogs.com and getting a response from myip, which is going to confuse your source machine, and it will just drop the confusing packets.

In this case, melikecandycoveredfrogs.com will need to do SNAT as well; so that myip thinks the connection originated from melikecandycoveredfrogs.com and sends the response back there; melikecandycoveredfrogs.com can then rewrite the addresses and send it back to your source machine.

I'm fairly sure this isn't your problem though, as http connections would have the same problem, and the way you've asked your question implies that http is working fine.

  • I got money on DNS being an issue here and not adding an A record. +1 – l0c0b0x Oct 25 '10 at 21:45
  • Wow I didn't even think of that second option. Good call. – Mykroft Oct 25 '10 at 21:46
  • Eeep. I just noticed the words "I have the ports forwarded and everything". I now have a new theory. – James Polley Oct 25 '10 at 21:51

When did you set up the domain? It may take some time for the new domain information to propagate. At the command line try running host melikecandycoveredfrogs.com and make sure that the result is myip. If it isn't then either your domain hasn't propagated yet or you haven't setup the domain correctly.

  • DNS doesn't propogate - caches expire and resolvers fetch new records from authoritative DNS servers. – EEAA Oct 25 '10 at 22:55
  • Propagate: 3a: to cause to spread out and affect a greater number or greater area. Sorry if my choice of words disappoints you but the mechanism by which DNS moves does not change the fact that there may be outdated caches he needs to deal with. That being said, Polley I think has the right of it anyway. – Mykroft Oct 26 '10 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.