How to pimp easily your ssh client config

SSH is one of the tool for every sysadmin or developer and is important to master at best.

Right now I am using few settings that improved my daily life with my servers.

Auto forward ports on logging to a server

Host your-host
  LocalForward 9090 localhost:9090
  LocalForward 9271 localhost:9271
  LocalForward 9217 localhost:9217
  LocalForward 9100 localhost:9100

Set a default user for a specific host

Host another-host
  User daniele

Create an alias

Host well-another-test.fake
    Hostname 255.255.255.255
    User awesomeuser
    IdentityFile ~/.ssh/keyfile
    port 2222
    IdentitiesOnly yes

This can be used with as host the fake one.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

How to pimp easily your ssh client config

time to read: <1 min
0