Jeff Riechers
06/18/2025, 11:18 AMJeff Riechers
06/18/2025, 11:18 AMAuthorizedKeysFile
• ~/.ssh/authorized_keys
• I was getting the same error as your Post Upgrading.
• But when I changed to AuthorizedKeysFile %h/.ssh/authorized_keys
• The issue was fixed and I was able to kill and rerun the sshd process.
Below is the reason for using %h instead of ~
• ~ is a shell feature, not part of the SSH daemon syntax — it’s expanded by the shell, but sshd does not parse it.
• In older OpenSSH versions, using ~ in AuthorizedKeysFile may have worked due to lenient or indirect path resolution.
• Modern OpenSSH versions (7.8+) strictly enforce configuration syntax — ~ is no longer accepted and may result in errors like:
◦ no AuthorizedKeysFile specified
• The correct supported syntax is AuthorizedKeysFile %h/.ssh/authorized_keys
◦ Where %h is properly resolved by sshd as the user’s home directoryTS
06/18/2025, 11:53 AM