On CentOS 7, i have Vault set up with an LDAP Authentication backend, and it works (successfully authenticates and creates a token and all with 'vault auth -method=ldap username=hunter' then enter LDAP password). So i assume the LDAP Auth backend works as expected.
I have also attempted to set up an SSH Secret Backend to go with this.
That command returns successfully and gives me the otp_key credentials output.
I then set up vault-ssh-helper on my remote host.
I get 'Verification Successful' when i run vault-ssh-helper with the '-verify-only' tag, so I assume my configuration is good and connects to my Vault.
The remote host is also set up as explained on
https://github.com/hashicorp/vault-ssh-helper (the sshd_config and pam sshd file). The only difference is that i set the first PAM line as ' auth sufficient' so my local user could log on to fix things.
However, when i try to login as an LDAP user (hunter) via SSH, the 'var/log/secure' logs only state ' pam_exec(sshd:auth): /usr/bin/vault-ssh-helper failed: exit code 1 ' as any indication, which gives me no clue as to why it failed.
When I try to use 'vault ssh -role otp_key_role hun...@x.x.x.x', it returns 'Failed to establish SSH connection:exit status 5' and the logs contain the same vault-ssh-helper error code.
I am wondering how vault-ssh-helper tries to authenticate by default. Am i able to use vault-ssh-helper and LDAP together with Vault? Or would i have to specify LDAP somewhere? Also it would be great to get errors to the vault-ssh-helper log as I don't have any errors in the log.
I'm not much of an SSH or LDAP expert, so any help would be greatly appreciated!
Thanks! -Hunter