Skip to content

Instantly share code, notes, and snippets.

@erayarslan
Created July 17, 2022 19:41
Show Gist options
  • Save erayarslan/9503632e9e02642bc122251dd461ae43 to your computer and use it in GitHub Desktop.
Save erayarslan/9503632e9e02642bc122251dd461ae43 to your computer and use it in GitHub Desktop.

requirements

  1. Server. (EXAMPLE IP: xxx.xxx.xxx.xxx)
  2. SSH Server installable device. (Mobile Phone, Raspberry Pi, PC ...) (IP: localhost)

steps

device

  1. Start SSH Server. (EXAMPLE PORT: 22)
  2. Open Terminal and follow this command.
# Choose Random Free PORT (EXAMPLE PORT: 3000)
$ ssh -N -R xxx.xxx.xxx.xxx:3000:localhost:22 xxx.xxx.xxx.xxx

outside world

  1. Connect with SSH.
# like this
$ ssh -p 3000 xxx.xxx.xxx.xxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment