ssh_config

On the client side, we have a few ways to configure how a connection will be held:

  • From the command line, passing options to the client while invoking it
  • From the configuration file inside the user's home directory ~/.ssh/config
  • From the system-wide configuration file in /etc/ssh/ssh_config

For the configuration files, we must bear in mind that only the first value obtained for each directive will be used; so if we give the same directive multiple times, only the first one will be evaluated. So, we must keep the more specific options at the beginning of the configuration file while the broader one will be pushed toward the end.

As we will see in the next paragraph, where we will examine a practical use of the client configuration, ...

Get Mastering Bash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.