Suppose we want to use a specific set of options while connecting to a particular host without having to enter them on the command line again & again.
We can accomplish this task by setting a client specific directive in the ssh_config file.
The order in which ssh_config file read entries is mentioned in the file but I'll write it here anyway:
# Configuration data is parsed as follows:
1. command line options
2. user-specific file
3. system-wide file
Any configuration value is only changed the first time it is set. Thus, host-specific definitions should be at the beginning of the configuration file, and defaults at the end.
So, if we want to connect to a system cfeclient using port 876 & ssh protocol 2 version 2, we'll enter the following lines in the ssh_config file:
To verify that the options have been set do a ssh login in verbose mode to cfeclient:
We can accomplish this task by setting a client specific directive in the ssh_config file.
The order in which ssh_config file read entries is mentioned in the file but I'll write it here anyway:
# Configuration data is parsed as follows:
1. command line options
2. user-specific file
3. system-wide file
Any configuration value is only changed the first time it is set. Thus, host-specific definitions should be at the beginning of the configuration file, and defaults at the end.
So, if we want to connect to a system cfeclient using port 876 & ssh protocol 2 version 2, we'll enter the following lines in the ssh_config file:
To verify that the options have been set do a ssh login in verbose mode to cfeclient:
From the output you can gather that the connection used protocol version 2 & port number 876.
No comments:
Post a Comment