Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

SSH: 12 Tricks You Probably Don't Know

23. 03. 2023 1 min read intermediate

SSH: 12 Tricks You Probably Don’t Know

Every developer uses SSH, but most only know ssh user@host. Here are 12 extra tricks.

1. SSH Config

~/.ssh/config

Host prod HostName 10.0.1.50 User deploy IdentityFile ~/.ssh/prod_key

2. Local Port Forward

ssh -L 5432:localhost:5432 prod

3. Reverse Tunnel

ssh -R 8080:localhost:3000 remote-server

4. SOCKS Proxy

ssh -D 1080 prod

5. Jump Host

ssh -J bastion prod-internal

6. Multiplexing

Host * ControlMaster auto ControlPath ~/.ssh/sockets/%r@%h-%p ControlPersist 600

7. rsync over SSH

rsync -avz –progress ./dist/ prod:/var/www/

8. Agent Forwarding

ssh -A bastion

9. Escape Sequences

~. terminates a frozen session ~? lists escape sequences

10. Parallel Commands

for host in web{1..5}; do ssh $host “uptime” &; done; wait

11. Ed25519 Keys

ssh-keygen -t ed25519 -C “[email protected]

12. Fail2ban

[sshd] enabled = true maxretry = 3 bantime = 3600

Tip

Disable password authentication, use Ed25519 keys and Fail2ban.

sshlinuxsecurity
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.