Expose ssh server to Internet using btunnel

With btunnel, you can expose your ssh server to the internet. This essentially gives you superpower to access your computer from anywhere in the world.

To begin with, you must have ssh server running on your computer. For Windows OS, you have to check the firewall as well to allow other computers to connect through ssh and perdorm any cli command in it.

Now, run btunnel command as follows:

btunnel tcp --key <API_KEY> --port 22

This is assuming that ssh server is running on port 22. Otherwise, you can specify the specific port ssh is running.

Output

  Name: -> John Doe                                                                     
  Email: -> john.doe@example.com                                                               

    tcp   http://tcp.btunnel.in:[::]:39665 -> http://localhost:22 Fri Feb  9 15:11:09 2024  



  Press q or Esc to exit     

This will make port 22 of your local computer accessible through http://tcp.btunnel.in and port 39665.

To connect to your computer through ssh globally run the following from anywhere -

ssh tcp.btunnel.in -p 39665

You will be prompted to enter username and password and then you will get connected. NOTE: You need to have a ssh server running in port 22 in your local machine in order for this to work. In Windows, you have to enable ssh server separately.

SEE ALSO