jueves, 20 de octubre de 2016

Configuring OpenSSH ssh configuration files

Configuring OpenSSH

14.2.1. Configuration Files


There are two different sets of configuration files: those for client programs (that is, sshscp, and sftp), and those for the server (the sshd daemon).

System-wide SSH configuration information is stored in the /etc/ssh/ directory as described in Table 14.1, “System-wide configuration files”. User-specific SSH configuration information is stored in ~/.ssh/ within the user's home directory as described in Table 14.2, “User-specific configuration files”.


Table 14.1. System-wide configuration files
FileDescription
/etc/ssh/moduliContains Diffie-Hellman groups used for the Diffie-Hellman key exchange which is critical for constructing a secure transport layer. When keys are exchanged at the beginning of an SSH session, a shared, secret value is created which cannot be determined by either party alone. This value is then used to provide host authentication.
/etc/ssh/ssh_configThe default SSH client configuration file. Note that it is overridden by ~/.ssh/config if it exists.
/etc/ssh/sshd_configThe configuration file for the sshd daemon.
/etc/ssh/ssh_host_dsa_keyThe DSA private key used by the sshd daemon.
/etc/ssh/ssh_host_dsa_key.pubThe DSA public key used by the sshd daemon.
/etc/ssh/ssh_host_keyThe RSA private key used by the sshd daemon for version 1 of the SSH protocol.
/etc/ssh/ssh_host_key.pubThe RSA public key used by the sshd daemon for version 1 of the SSH protocol.
/etc/ssh/ssh_host_rsa_keyThe RSA private key used by the sshd daemon for version 2 of the SSH protocol.
/etc/ssh/ssh_host_rsa_key.pubThe RSA public key used by the sshd daemon for version 2 of the SSH protocol.
/etc/pam.d/sshdThe PAM configuration file for the sshd daemon.
/etc/sysconfig/sshdConfiguration file for the sshd service.

Table 14.2. User-specific configuration files
FileDescription
~/.ssh/authorized_keysHolds a list of authorized public keys for servers. When the client connects to a server, the server authenticates the client by checking its signed public key stored within this file.
~/.ssh/id_dsaContains the DSA private key of the user.
~/.ssh/id_dsa.pubThe DSA public key of the user.
~/.ssh/id_rsaThe RSA private key used by ssh for version 2 of the SSH protocol.
~/.ssh/id_rsa.pubThe RSA public key used by ssh for version 2 of the SSH protocol.
~/.ssh/identityThe RSA private key used by ssh for version 1 of the SSH protocol.
~/.ssh/identity.pubThe RSA public key used by ssh for version 1 of the SSH protocol.
~/.ssh/known_hostsContains DSA host keys of SSH servers accessed by the user. This file is very important for ensuring that the SSH client is connecting the correct SSH server.
For information concerning various directives that can be used in the SSH configuration files, see the 

No hay comentarios:

Publicar un comentario