2

I want to be able to SSH to my home computer with lubuntu 18.04 from my tablet computer when I am not at home. I need this access to practice in programming when I cannot be in front of computer. I live at student apartment and ISP provides Ethernet connection to my room and I do not have any router. Alternatively I can connect to Internet by sharing Mobile data from phone. So I do not have dedicated IP on my computer.

All the instructions that I found in internet says that I must:

  1. Install Open SSH server on my Ubuntu and open port 22- I have done that.
  2. Get static domain from DNS service such as www.noip.net - I have done also that, now my lubuntu updates an ip to noip.net every 5 seconds.
  3. Set port forwarding on the router - I cannot set port forwarding on router as I do not have any router in my scenario.

How to set SSH to my ubuntu if I do not have static IP neither a router at my place?

vasilyv
  • 21
  • 3
  • So if you don't have a router, then you don't need to forward a port. – Pilot6 Jun 14 '20 at 16:56
  • But is your IP real or a local? Please post first two octets that is shown in Ubuntu. – Pilot6 Jun 14 '20 at 16:57
  • It sounds like you are asking how to get around the school firewall, which is not an ubuntu problem, but is a security problem. You should be talking to the school IT dept. for an approved way to do what you want. – ubfan1 Jun 14 '20 at 18:29

1 Answers1

1

Have you looked at ngrok? ( https://ngrok.com )

Basically run

ngrok tcp 22

on your local machine that you want to ssh into.

You will get a hostname and port that you can ssh into from remote machines that is forwarded to your local machine running ngrok.

ngrok by @inconshreveable                                                                              
(Ctrl+C to quit)                                                                                                                        
Session Status                online                                                                                    
Account                       Dwayne Moore (Plan: Free)                                                                 
Version                       2.3.35                                                                                    
Region                        United States (us)                                                                        
Web Interface                 http://127.0.0.1:4040                                                                     
Forwarding                    tcp://0.tcp.ngrok.io:12048 -> localhost:22                                                                                                                                                                        
Connections                   ttl     opn     rt1     rt5     p50     p90                                                                             
15      1       0.16    0.04    2.30    2.31

For example:

ssh user@0.tcp.ngrok.io -p 12048

Dwayne Moore
  • 121
  • 1
  • 3
  • Thank you for your advice Dwaine. I installed ngrok and it works. Excuse me do you know how to login to home computer when i am outside? I cannot perform command "ngrok tcp 22" to know the current port when I am not at home, so I will not be able to ssh being not at home? – vasilyv Jun 22 '20 at 22:19
  • Is it safe yo use `ngrok`? wouldn't be slow so connect over `ngrok`? – alper Mar 07 '21 at 23:36
  • @vasilyv you can see the port in ngrok dashboard: https://dashboard.ngrok.com/cloud-edge/status – yusufmalikul Mar 03 '22 at 14:11