`mirror-registry install` fails with error "Permission denied (password)."
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- mirror-registry for OpenShift
Issue
-
The
mirror-registry installcommand terminates with the following error.TASK [Gathering Facts] ********************************************************************************************************************************************************************** fatal: [root@mirror.hogehoge.com]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'mirror.hogehoge.com,10.10.10.99' (ECDSA) to the list of known hosts.\r\nroot@mirror.hogehoge.com: Permission denied (password).", "unreachable": true} -
How can this error be resolved to install
mirror-registry?
Resolution
-
Modify the
sshd_configon the host where you want to installmirror-registry for OpenShift.-
Remove
passwordfrom the definition ofAuthenticationMethods.$ sudo vi /etc/ssh/sshd_config AuthenticationMethods publickey,password #<---- delete 'password' -
Restart the
sshd.service.$ sudo systemctl restart sshd
-
Note: Apart from the above said reason, this error can popo up for multiple reasons. ssh denial can happen on a host due to several reasons like, but no limited to, issues with ssh service, ssh is blocked on the host and network issues. Make sure the host is capabale of performing ssh before trying to install mirror registry.
Root Cause
- Public key authentication is used during the installation of
mirror-registry for OpenShift. - If
passwordis included inAuthenticationMethods, password authentication is used, which leads to an error indicating insufficient permissions.
Diagnostic Steps
-
See the
sshd_configon the host where you want to installmirror-registry for OpenShift.$ sudo cat /etc/ssh/sshd_config | grep AuthenticationMethods AuthenticationMethods publickey,password
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments