Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 have ubuntu server in my home and I want get acces it from elswhere. I don't have public adress IP on my ubuntu server so I can't reach it from internet. I have static DNS etc. I heard of hamachi but I must install this on every computer which I want to connect to my ubuntu server at home. I want only acces to terminal.

share|improve this question
up vote 0 down vote accepted

You need to setup a reverse ssh tunnel

ssh -nNT -R

What this does is forwards any connections on port 1100 of the remote server to port 22 of the local system. You'd have to prepare this connection in advance, and it is not as reliable as a VPN.

If you want more reliability (ssh connection might get dropped), go for openvpn.

share|improve this answer
But I need server with public IP. I don't have any. – user84471 Nov 7 '12 at 10:55
You can try out pagekite or localtunnel for that purpose. Just remember to forward your ssh port(22) instead of web(80). – Abhay Rana Nov 7 '12 at 12:18
Thanks! I installed localtunnel and I get adress even but when I try connect from another computer using putty then I get "access denied" after typing password. – user84471 Nov 7 '12 at 16:09
I tried ssh from ubuntu and I get "Permission denied, please try later". – user84471 Nov 7 '12 at 16:23
Are you using the correct username? – Abhay Rana Nov 8 '12 at 4:56

You could set up a reverse NAT rule in your router/NAT/firewall so that any connection to your router from outside on a port will be translated to a another machines address and port in your local network.

So port 22 on your router could translat to port 22 on your server. Then you just need to register in your DNS your server with the global IPv4 address of your router.

Or you can set up IPv6 and then all your machines could have proper global adressers. But the machine you then connect from also need to be on a IPv6 net. Don't forget to set up firewall on your IPv6-router and your machines. Which is quite easy to do with ufw.

share|improve this answer

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.