Last active
March 24, 2025 17:48
-
-
Save philippeoz/e33632f11c64149a00393465fee2cff5 to your computer and use it in GitHub Desktop.
SSH with Ngrok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
# ON SERVER # | |
######################### | |
# install openssh-server | |
sudo apt install openssh-server | |
# start openssh-server | |
sudo service ssh start | |
# create account, login, download and unzip ngrok -> https://ngrok.com/ | |
./ngrok authtoken 4p1yFWPk__YOUR_KEY_OBTAINED_ON_NGROK_SITE__EvXn3Bgn | |
# start ssh/tcp tunnel (22 or 12345, you choose the port) | |
./ngrok tcp 22 | |
# ngrok will start like: | |
# ngrok by @inconshreveable (Ctrl+C to quit) | |
# | |
# Session Status online | |
# Account User Name (Plan: Free) | |
# Version 2.3.27 | |
# Region United States (us) | |
# Web Interface http://127.0.0.1:4040 | |
# Forwarding tcp://0.tcp.ngrok.io:16965 -> localhost:22 | |
# /\ url and port number you'll use on ssh connection | |
######################### | |
# ON CLIENT # | |
######################### | |
ssh [email protected] -p 16965 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment