Skip to content
This repository has been archived by the owner on Dec 26, 2020. It is now read-only.

HostKey comment "# Req 20" breaks key based auth #262

Closed
abtreece opened this issue Jan 22, 2020 · 0 comments
Closed

HostKey comment "# Req 20" breaks key based auth #262

abtreece opened this issue Jan 22, 2020 · 0 comments
Labels

Comments

@abtreece
Copy link
Contributor

Describe the bug
Working on implementing Okta Advanced Server Access (formerly ScaleFT) which utilizes client certificate authentication for SSH. Connections are failing with "ssh: handshake failed: open : no such file or directory". After much troubleshooting the problem appears to be the "# Req 20" comment that is added to the HostKey configuration in /etc/ssh/sshd_config

HostKey {{key}} # Req 20

Expected behavior
Successful SSH login to the instance.

Actual behavior

$ ssh bastion.<domain.ext>
The authenticity of host <IP> cannot be be established.
ecdsa-sha2-nistp256 key fingerprint is SHA256:wOFz1AOvH479dWUnISYThbz+iIButdnGPz4O/vtOI6s.
Add to known_hosts?: yes
error: ssh: handshake failed: open : no such file or directory
ssh_exchange_identification: Connection closed by remote host

Example Playbook
N/A

OS / Environment
Amazon Linux 1

Ansible Version
2.6.4

Role Version
All

Additional context
Add any other context about the problem here.

abtreece added a commit to abtreece/ansible-ssh-hardening that referenced this issue Jan 22, 2020
abtreece added a commit to abtreece/ansible-ssh-hardening that referenced this issue Jan 22, 2020
Fix for GitHub issue dev-sec#262

Signed-off-by: abtreece <britt@spreedly.com>
@rndmh3ro rndmh3ro added the bug label May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants