Multiple entry in .ssh/config file

2014-10-24 111 words 1 min read

Here is a link to one post on ssh config file.

However, if you want entries for lot of servers with their IPs or names, then it could be cumbersome to add all the entries in the .ssh/config file. So, here is a shortcut notation:

Host 1 2 3 4 5 6
Hostname 192.168.1.%h
    User 
    
    Ciphers arcfour

where '%h' denotes the IP that you use in the ssh command.

The following escape character substitutions will be performed:
             ‘%d’ (local user's home directory), ‘%h’ (remote host name), ‘%l’ (local host name),
              ‘%n’ (host name as provided on the command line), ‘%p’ (remote port),
              ‘%r’ (remote user name) or ‘%u’ (local user name).


author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it