SSH Config Patterns
The host directive mentioned in syntax can contain one pattern or space-separated list of patterns.
Host nancy server Working Patterns nancy, server
Patterns can contain one of the following specifiers as well,
- * – Matches zero or more characters.
Host nancy* Working Patterns nancy,nancy123,nancy-server,etc
- ? – matches exactly one character.
Host nancy? Working Patterns nancy1, nancy2, nancy3, etc
- ! – When used at the start of a pattern, it negates the match.
Host nan* !nancy Working Patterns nan-1, naneo, etc [nancy will not work]
How to configure SSH Client in Linux ?
At times we may need to access multiple remote systems with different IP addresses/hostnames, usernames, non-standard-ports with various command-line options. One way is to create a bash alias for each remote connection. But we have an easy and much better solution to this problem. OpenSSH allows to create per-user configuration file to store different SSH options for each remote server. In this article, we will see the basics of SSH Client configuration with some examples.
Contact Us