Cheatsheet to connect 💻️ local and ☁️ remote services through SSH.
(L)ocal port forwarding
💻️ local port → ☁️ remote port.
ssh -L local_port:remote_host:remote_port username@server
(R)emote port forwarding
☁️ remote port → 💻️ local port.
ssh -R remote_port:local_host:local_port username@server
(D)ynamic port forwarding
Opens SOCKS proxy through ☁️ remote on 💻️ local port
ssh -D local_port username@server