Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| rh124_ssh [2026/10/23 12:29] – [/etc/ssh/ directory layout] rpjday | rh124_ssh [2026/10/30 08:42] (current) – [The SSH host keys] rpjday | ||
|---|---|---|---|
| Line 109: | Line 109: | ||
| </ | </ | ||
| - | ===== /etc/ssh/ directory layout ===== | + | Both higher-level packages depend on '' |
| < | < | ||
| - | $ ls -l | + | $ rpm -qR openssh-server |
| + | $ rpm -qR openssh-clients | ||
| + | </ | ||
| + | ===== /etc/ssh/ system-wide SSH configuration ===== | ||
| + | |||
| + | Both system-wide client and server configuration. | ||
| + | |||
| + | < | ||
| + | $ ls -lF | ||
| + | total 564 | ||
| -rw-r--r--. 1 root root 541716 May 19 20:00 moduli | -rw-r--r--. 1 root root 541716 May 19 20:00 moduli | ||
| -rw-r--r--. 1 root root 1916 May 19 20:00 ssh_config | -rw-r--r--. 1 root root 1916 May 19 20:00 ssh_config | ||
| - | drwxr-xr-x. 2 root root 28 Oct 17 12:18 ssh_config.d | + | drwxr-xr-x. 2 root root 28 Oct 17 12:18 ssh_config.d/ |
| -rw-------. 1 root root 3674 May 19 20:00 sshd_config | -rw-------. 1 root root 3674 May 19 20:00 sshd_config | ||
| - | drwx------. 2 root root 66 Oct 17 12:18 sshd_config.d | + | drwx------. 2 root root 66 Oct 17 12:18 sshd_config.d/ |
| -rw-------. 1 root root 480 Oct 17 12:19 ssh_host_ecdsa_key | -rw-------. 1 root root 480 Oct 17 12:19 ssh_host_ecdsa_key | ||
| -rw-r--r--. 1 root root 162 Oct 17 12:19 ssh_host_ecdsa_key.pub | -rw-r--r--. 1 root root 162 Oct 17 12:19 ssh_host_ecdsa_key.pub | ||
| Line 145: | Line 154: | ||
| └── ssh_host_rsa_key.pub | └── ssh_host_rsa_key.pub | ||
| $ | $ | ||
| + | </ | ||
| + | |||
| + | ===== The SSH host keys ===== | ||
| + | |||
| + | Created in ''/ | ||
| + | |||
| + | < | ||
| + | $ ls -l ssh_host* | ||
| + | -rw-------. 1 root root 480 Oct 17 12:19 ssh_host_ecdsa_key | ||
| + | -rw-r--r--. 1 root root 162 Oct 17 12:19 ssh_host_ecdsa_key.pub | ||
| + | -rw-------. 1 root root 387 Oct 17 12:19 ssh_host_ed25519_key | ||
| + | -rw-r--r--. 1 root root 82 Oct 17 12:19 ssh_host_ed25519_key.pub | ||
| + | -rw-------. 1 root root 2578 Oct 17 12:19 ssh_host_rsa_key | ||
| + | -rw-r--r--. 1 root root 554 Oct 17 12:19 ssh_host_rsa_key.pub | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | Every SSH server has a static, unique cryptographic key pair consisting of a private host key (kept strictly secret on the server) and a public host key (shared with clients). | ||
| + | |||
| + | ===== sshd_config file ===== | ||
| + | |||
| + | < | ||
| + | # This is the sshd server system-wide configuration file. See | ||
| + | # sshd_config(5) for more information. | ||
| + | |||
| + | # This sshd was compiled with PATH=/ | ||
| + | |||
| + | # The strategy used for options in the default sshd_config shipped with | ||
| + | # OpenSSH is to specify options with their default value where | ||
| + | # possible, but leave them commented. | ||
| + | # default value. | ||
| + | |||
| + | # To modify the system-wide sshd configuration, | ||
| + | # / | ||
| + | Include / | ||
| + | |||
| + | # If you want to change the port on a SELinux system, you have to tell | ||
| + | # SELinux about this change. | ||
| + | # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER | ||
| + | # | ||
| + | #Port 22 | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | #HostKey / | ||
| + | #HostKey / | ||
| + | #HostKey / | ||
| + | |||
| + | # Ciphers and keying | ||
| + | #RekeyLimit default none | ||
| + | |||
| + | # Logging | ||
| + | # | ||
| + | #LogLevel INFO | ||
| + | |||
| + | # Authentication: | ||
| + | |||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # | ||
| + | |||
| + | # The default is to check both .ssh/ | ||
| + | # but this is overridden so installations will only check .ssh/ | ||
| + | AuthorizedKeysFile | ||
| + | |||
| + | # | ||
| + | |||
| + | # | ||
| + | # | ||
| + | |||
| + | # For this to work you will also need host keys in / | ||
| + | # | ||
| + | # Change to yes if you don't trust ~/ | ||
| + | # HostbasedAuthentication | ||
| + | # | ||
| + | # Don't read the user's ~/.rhosts and ~/.shosts files | ||
| + | # | ||
| + | |||
| + | # To disable tunneled clear text passwords, change to no here! | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # Change to no to disable s/key passwords | ||
| + | # | ||
| + | |||
| + | # Kerberos options | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # GSSAPI options | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # Set this to ' | ||
| + | # and session processing. If this is enabled, PAM authentication will | ||
| + | # be allowed through the KbdInteractiveAuthentication and | ||
| + | # PasswordAuthentication. | ||
| + | # PAM authentication via KbdInteractiveAuthentication may bypass | ||
| + | # the setting of " | ||
| + | # If you just want the PAM account and session checks to run without | ||
| + | # PAM authentication, | ||
| + | # and KbdInteractiveAuthentication to ' | ||
| + | # WARNING: ' | ||
| + | # problems. | ||
| + | #UsePAM no | ||
| + | |||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | #PermitTTY yes | ||
| + | #PrintMotd yes | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | #UseDNS no | ||
| + | #PidFile / | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | # no default banner path | ||
| + | #Banner none | ||
| + | |||
| + | # override default of no subsystems | ||
| + | Subsystem | ||
| + | |||
| + | # Example of overriding settings on a per-user basis | ||
| + | #Match User anoncvs | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| </ | </ | ||