OpenSSH Client knows the following configurations locations:
/etc/ssh/ssh_config
~/.ssh/config
HostKeyAlgorithms ssh-rsa-cert-v01@openssh.com,ssh-rsa
VerifyHostKeyDNS ask
Host *
ServerAliveInterval 10
ServerAliveCountMax 2
Host *
IdentitiesOnly yes
Host *
StrictHostKeyChecking yes
mkdir -p ~/.ssh/keys
Host example.org
Hostname example.org
User john
IdentityFile ~/.ssh/keys/john.doe@example.org
Host ssh-gateway.example.org
Hostname ssh-gateway.example.org
User john
IdentityFile ~/.ssh/keys/john.doe@example.org
Host intern.example.org
Hostname intern.example.org
User john
ProxyJump ssh-gateway.example.org
Note
This feature requires a patch included in Progress Linux but currently not included in Debian.
mkdir -p ~/.ssh/configs
Include ~/.ssh/configs/example.org
OpenSSH Server knows the following configurations locations:
/etc/ssh/sshd_config
AuthorizedKeysFile /etc/ssh/authorized_keys/%u %h/.ssh/authorized_keys
PubkeyAcceptedKeyTypes ssh-rsa-cert-v01@openssh.com,ssh-rsa
Note
openssh-server will recreate DSA, ECDSA, and ED25519 keys on upgrades on Debian systems (not on Progress Linux).
sudo rm -f /etc/ssh/ssh_host_*dsa_key*
sudo sed -i -e 's|^\(HostKey .*dsa_key$\)|#\1|' /etc/ssh/sshd_config
sudo rm -f /etc/ssh/ssh_host_*ed25519_key*
sudo sed -i -e 's|^\(HostKey .*ed25519_key$\)|#\1|' /etc/ssh/sshd_config
PasswordAuthentication no
PermitRootLogin no
PrintMotd no
DebianBanner no
AcceptEnv
HostCertificate /etc/ssh/ssh_host_rsa_key-cert.pub
cat > /etc/ssh/ssh_known_hosts << EOF
@cert-authority *.example.org ssh-rsa [...]
EOF
LogLevel VERBOSE
cat > /etc/rsyslog.d/openssh-server.conf << EOF
:msg, regex, "Accepted publickey for .*" -/var/log/openssh-server.log
:msg, regex, "Found matching .* key:" -/var/log/openssh-server.log
EOF