OSX: Easily SSH into local computer via ngrok

Enable remote login via going to “Sharing” in preferences, then clicking the “Remote Login” checkbox.

Next, download ngrok
https://ngrok.com/

Once set up, simply write into the command line:

ngrok -proto=tcp 22

Now you can SSH into your computer from the port number specified.

Example: ssh myusername -p PORT_THEY_SPECIFIED

This method bypasses any IP configuration at all, making it bullet proof.

Update: Ngrok2

Ngrok 2 requires authentication. Sign up for an account, authenticate via single command line ngrok authtoken <TOKEN>

Run

ngrok tcp 22

Conntect via SSH via ssh <user>@<HOSTNAME> -p <PORT>

Leave a Comment