Forward a remote port
Make local port 3000 available as port 8080 on the VPS
ssh -R 8080:localhost:3000 user@vps -N
- tool
- ssh15 commands
More ssh commands
-
ssh -D 1080 user@vps -N -fCreate a local SOCKS5 proxy on port 1080 that tunnels through the VPS and runs in the background
-
ssh -o ControlMaster=auto -o ControlPath=~/.ssh/mux-%r@%h:%p -o ControlPersist=10m user@hostLater SSH commands reuse the open connection; it stays alive 10 minutes after you exit
-
ssh user@host 'sudo systemctl status nginx'Run a command over SSH without an interactive shell
-
scp -r -P 2222 ./dist/ user@host:/var/www/app/Copy recursively to a server on a non-standard port
-
ssh -A user@bastionForward your local SSH agent to the remote host; use with care