• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Understanding OpenSSH Configuration Files

By admin

OpenSSH clients and servers have several configuration files. Global configuration files are stored in the /etc/ssh directory. User configuration files are stored in an .ssh directory in user home directories (~/.ssh).

/etc/ssh: Global Files

The following are brief descriptions of the global configuration files under /etc/ssh directory.

# ls -lrt /etc/ssh
total 156
-rw-------  1 root root 125811 Aug  7 13:40 moduli
-rw-r--r--. 1 root root    382 Aug  9 00:39 ssh_host_rsa_key.pub
-rw-------. 1 root root   1675 Aug  9 00:39 ssh_host_rsa_key
-rw-r--r--. 1 root root    627 Aug  9 00:39 ssh_host_key.pub
-rw-------. 1 root root    963 Aug  9 00:39 ssh_host_key
-rw-r--r--. 1 root root    590 Aug  9 00:39 ssh_host_dsa_key.pub
-rw-------. 1 root root    668 Aug  9 00:39 ssh_host_dsa_key
-rw-r--r--. 1 root root   2103 Aug  9 00:40 ssh_config
-rw-------. 1 root root   3949 Aug  9 00:40 sshd_config
File Purpose
moduli Contains key exchange information used to establish a secure connection
ssh_config The default OpenSSH client configuration file. Entries are overridden by a user’s ~/.ssh/config file.
sshd_config The configuration file for the sshd daemon
ssh_host_ecdsa_key The ECDSA private key used by the sshd daemon
ssh_host_ecdsa_key.pub The ECDSA public key used by the sshd daemon
ssh_host_key The RSA private key for version SSH1
ssh_host_key.pub The RSA public key for version SSH1
ssh_host_rsa_key The RSA private key for version SSH2
ssh_host_rsa_key.pub The RSA public key for version SSH2

There is also a PAM configuration file for the sshd daemon, /etc/pam.d/sshd, and a configuration file for the sshd service, /etc/sysconfig/sshd.

~/.ssh: User Files

OpenSSH creates the ~/.ssh directory and the known_hosts file automatically when you connect to a remote system. The following are brief descriptions of the user-specific configuration files:

File Purpose
authorized_keys Contains a list of authorized public keys for SSH servers. The server authenticates the client by checking its signed public key within this file.
id_ecdsa The ECDSA private key of the user
id_ecdsa.pub The ECDSA public key of the user
id_rsa The RSA private key for version SSH2
id_rsa.pub The RSA public key for version SSH2
identity The RSA private key for version SSH1
identity.pub The RSA public key for version SSH1
known_hosts Contains host keys of SSH servers accessed by the user. OpenSSH automatically adds entries each time the user connects to a new server.

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to Disable RSH Server in CentOS/RHEL
  2. CentOS / RHEL : How to add iptable rules
  3. Linux “seq” Command Examples
  4. How to Change the filesystem Labels in CentOS/RHEL
  5. iSCSI troubleshooting : Targets Not Detected After Reboot
  6. How to change the default location (/var/cache/yum) of yum cache
  7. Beginners Guide to Swap Space Management in Linux
  8. How To Find When The Spfile Was Created On Linux Server
  9. How to enable md5 Hashing in Linux
  10. Downloading a Specific Version of Package and Its Dependencies from Repository for Offline Installation Using YUM

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable ACPI in CentOS/RHEL 7
  • How to Use real-time query to access data on a physical standby database
  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary