- Security Policy
- Configuration
- Mechanics of Configuration Files
- Recommendations
- Appendix: Configuration Files
- About the Author
- References
- Ordering Sun Documents
- Accessing Sun Documentation Online
Mechanics of Configuration Files
OpenSSH places sshd_config and ssh_config in the location specified by the sysconfdir keyword when OpenSSH is built. The usual values are /etc, /usr/local/etc, /etc/ssh, or /etc/openssh. The Solaris Secure Shell software stores the two files in /etc/ssh. These files should be owned by user root and group sys. The file permission mode should be either 644 or 444. The server checks for the optional user configuration file at ~/.ssh/config. This file should not be world or group writable.
Configuration files contain two types of entries: comments and keyword-value pairs. Comments are blank lines and lines beginning with the hash mark (#). Keyword-value pairs consist of an identifier (keyword), a space, then the value associated with the identifier. Keywords are case-insensitive while values are case-sensitive.
Traditionally, keywords have the first letter of each word capitalized for readability. Some values are lists that are either comma or space delimited depending on the keyword. Consider keeping configuration files under source control to track revisions. The source control tags can be hidden by the comment character (the hash mark).
# Example config file - two comments and one # keyword-value pair Port 22