How I access my website through SSH

24年 9月 26日 Thursday
132 words
1 minutes

Why bother doing all these stuff?

if you have sensitive website that provide top-secret confidential data, you might want to hide it from everyone on the Internet! in my case, I have cockpit dashboard and want to access it remotely, so I tunnel it through ssh.

text
ssh -N -C -L 8080:127.0.0.1:9090 user@addr -p <ssh_port_number>

a brief explanation:

  • 8080 is the local port on your machine
  • 9090 is the remote port on your server
  • ssh_port_number is self-explanatory, you don't need to specify it if it's default, I need to determine the port because I access ssh through ngrok
  • see the rest explanation of argument on ssh(1)

congratulations! you can now access your website securely on your laptop or smart phone (if android, use termux)

just FYI, I also have discuss it on cloudflare forum, you can read the thread if you're interested.

Title:How I access my website through SSH

Author:ReYuki

Link:https://www.reyuki.site/posts/access-your-website-from-ssh [copy]

Last updated:


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. You are free to share and adapt it, as long as you give appropriate credit, don’t use it for commercial purposes, and distribute your contributions under the same license. Provided under license CC BY-NC-SA 4.0