SSH Config File Example
When a user wants to connect to a remote server through ssh, then he should mention remote username followed by IP address or hostname and port (default port 22 can be ignored). Consider below example,
Now, we can have the below lines in ~/.ssh/config file,
If we simply type ssh server, the ssh client will read the configuration file and use the options mentioned to connect to the remote server.
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