Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

up vote 0 down vote accepted

You need to setup a reverse ssh tunnel

ssh -nNT -R 1100:local.mydomain.com:22 [email protected]

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). –  Capt.Nemo 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? –  Capt.Nemo 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

 
discard

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.