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

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

@abtreece

Description

@abtreece

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions