← cd ../posts

ssh like a pro

Jul 18, 2026#tutorials

Most people use ssh like a door. It is actually a whole hallway. Here are the pieces that changed how I work.

1. stop typing hostnames

# ~/.ssh/config
Host lab
    HostName 192.168.1.42
    User thapaswin
    IdentityFile ~/.ssh/lab_ed25519

Now ssh lab just works — and so does scp, rsync, and every tool built on top of ssh.

2. jump hosts

ssh -J bastion internal-box

One flag replaces the old two-hop dance. Put ProxyJump bastion in the config and forget it exists.

3. port forwarding

# local: bring a remote service to your machine
ssh -L 5432:localhost:5432 db-server

# remote: expose your local dev server to a box
ssh -R 8080:localhost:3000 demo-server

Once these click, you will never look at a VPN the same way. A follow-up post on SOCKS proxying is coming.