This is an old revision of the document!
RH124 SSH configuration
Overview
Both client and server side configuration and usage of SSH involves three packages:
openssh-serveropenssh-clientsopenssh
We will examine these packages shortly.
Starting and stopping the SSH service
Check the status of sshd.service:
$ systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; preset: enabled)
Active: active (running) since Fri 2026-10-23 02:00:51 EDT; 5h 49min ago
Invocation: 9f19b671aa534042a2785fca1a1078c5
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 918 (sshd)
Tasks: 1 (limit: 48852)
Memory: 7.5M (peak: 24.8M)
CPU: 119ms
CGroup: /system.slice/sshd.service
└─918 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
Oct 23 02:00:51 localhost.localdomain systemd[1]: Starting sshd.service - OpenSSH server daemon...
Oct 23 02:00:51 localhost.localdomain sshd[918]: Server listening on 0.0.0.0 port 22.
Oct 23 02:00:51 localhost.localdomain sshd[918]: Server listening on :: port 22.
Oct 23 02:00:51 localhost.localdomain systemd[1]: Started sshd.service - OpenSSH server daemon.
Oct 23 02:04:09 localhost.localdomain sshd-session[1924]: Accepted password for rpjday from 192.168.122.1 port 52956 ssh2
Oct 23 02:04:09 localhost.localdomain sshd-session[1924]: pam_unix(sshd:session): session opened for user rpjday(uid=1000) by rpjday(uid=0)
Oct 23 07:12:23 localhost.localdomain sshd-session[2972]: Accepted password for rpjday from 192.168.122.1 port 43614 ssh2
Oct 23 07:12:23 localhost.localdomain sshd-session[2972]: pam_unix(sshd:session): session opened for user rpjday(uid=1000) by rpjday(uid=0)
$
Stop, check and restart the service:
$ sudo systemctl stop sshd.service $ systemctl status sshd.service $ sudo systemctl start sshd.service
NOTE: Stopping sshd.service does not kill existing connections, just attempts at new ones.
(Abbreviated) package contents and directory layout
References to man/doc pages and build IDs deleted for brevity.
NOTE: Executables under /usr/libexec are not meant to be invoked directly, but are typically “helper” utilities for other programs.
openssh-server
/etc/pam.d/sshd /etc/ssh/sshd_config /etc/ssh/sshd_config.d /etc/ssh/sshd_config.d/40-redhat-crypto-policies.conf /etc/ssh/sshd_config.d/50-redhat.conf /etc/sysconfig/sshd /usr/lib/systemd/system/ssh-host-keys-migration.service /usr/lib/systemd/system/sshd-keygen.target /usr/lib/systemd/system/sshd-keygen@.service /usr/lib/systemd/system/sshd.service /usr/lib/systemd/system/sshd.socket /usr/lib/systemd/system/sshd@.service /usr/lib/sysusers.d/openssh-server.conf /usr/libexec/openssh/sftp-server /usr/libexec/openssh/ssh-host-keys-migration.sh /usr/libexec/openssh/sshd-keygen /usr/libexec/openssh/sshd-session /usr/sbin/sshd /var/lib/.ssh-host-keys-migration
openssh-client
/etc/ssh/ssh_config /etc/ssh/ssh_config.d /etc/ssh/ssh_config.d/50-redhat.conf /usr/bin/scp /usr/bin/sftp /usr/bin/ssh /usr/bin/ssh-add /usr/bin/ssh-agent /usr/bin/ssh-copy-id /usr/bin/ssh-keyscan /usr/lib/systemd/user/ssh-agent.service /usr/lib/systemd/user/ssh-agent.socket /usr/libexec/openssh/ssh-pkcs11-helper /usr/libexec/openssh/ssh-sk-helper
openssh
/etc/ssh /etc/ssh/moduli /usr/bin/ssh-keygen /usr/libexec/openssh
/etc/ssh/ directory layout
Both client and server content.
$ ls -l -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 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 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-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 $
$ sudo tree -F ./ ├── moduli ├── ssh_config ├── ssh_config.d/ │ └── 50-redhat.conf ├── sshd_config ├── sshd_config.d/ │ ├── 40-redhat-crypto-policies.conf │ └── 50-redhat.conf ├── ssh_host_ecdsa_key ├── ssh_host_ecdsa_key.pub ├── ssh_host_ed25519_key ├── ssh_host_ed25519_key.pub ├── ssh_host_rsa_key └── ssh_host_rsa_key.pub $