Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I setup a home server to play with. Instead of remembering the IP address, I created a subdomain on my hostmonster personal website ( and redirected it to point at my server at home.

On my router firewall at home, I forwarded port 80 and 22 to allow web and ssh to get through to that server.

It seems, however, that my webhost forwards the port 80 requests, but does not forward ssh requests. I came to that conclusion after noticing the following:

When I access I successfully see the web pages hosted on my home server. However, when I ssh into I cannot authenticate. ssh'ing into homeusername@homeIP works fine.

I also found that ssh'ing into will ssh successfully into my web account.

Does anyone know how I can setup that kind of 'ssh forwarding' ?

Thanks in advance,

share|improve this question

migrated from Jun 20 '11 at 14:48

This question came from our site for professional and enthusiast programmers.

Are you saying that ssh logs you into your hostmonster web account, or an account on your home server? – Chris Ting Jun 20 '11 at 15:08
into my Hostmonster web account :) – neildaemond Jun 20 '11 at 15:41
up vote 2 down vote accepted

You need to go into your domain's name server, and create an A record for your subdomain that points at your home IP. If you don't have a static IP at home, then you'll need to setup a dynamic DNS. There are many Dynamic DNS providers on Google; find one you like.

The key part of your question is that you "redirected" your subdomain to point at your server at home. I assume that you used something like the HTTP refresh header. When you try to reach your home server through the redirect, this is how the flow works:

  1. You send a request on port 80
  2. The Hostmonster server receives the request on port 80
  3. The apache server sees the redirect, and forwards to the redirect's port 80
  4. Your request reaches your home router on port 80
  5. Your request reaches your home server on port 80

Now here's what happens when you try to ssh into your home server:

  1. You send a request on port 22
  2. The Hostmonster server recieves the request on port 22
  3. The Hostmonster sees that your user doesn't exist on the server; access denied

The difference is that on port 80, apache sees the redirect. On port 22, sshd doesn't know about a redirect and believes you're trying to ssh into the Hostmonster server.

share|improve this answer
Thank you, I changed hosts before I saw your reply and its been a long time since I posted this. But, I've since worked with DNS more and your solution of creating an A record would have been right on the money. – neildaemond Apr 25 '12 at 9:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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