New

Set Up ~/.ssh/config for Several Servers

A complete config file: shared defaults at the top, then one short block per server so you connect with a name instead of an address.

After this, ssh prod replaces ssh deploy@203.0.113.10 -p 2222, and scp, rsync and git all understand the same short name. Host * at the end applies to every entry above it.

When you need this: Once you manage more than one server, or as soon as you are retyping IP addresses and usernames.

Variables

Command


        
2 views 0 copies
Log in to rate
Log in to save

Free account. Save snippets into your own collections.