geerlingguy / ansible-role-security

Ansible Role - Security

Home Page:https://galaxy.ansible.com/geerlingguy/security/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSH getting file not found errors.

gheydon opened this issue · comments

I am getting the following errors.

failed: [x.x.x.x] (item={u'regexp': u'^PasswordAuthentication', u'line': u'PasswordAuthentication no'}) => {"ansible_loop_var": "item", "changed": false, "cmd": "sshd -T -f /tmp/tmpbALBAx", "item": {"line": "PasswordAuthentication no", "regexp": "^PasswordAuthentication"}, "msg": "[Errno 2] No such file or directory", "rc": 2} failed: [x.x.x.x] (item={u'regexp': u'^PasswordAuthentication', u'line': u'PasswordAuthentication no'}) => {"ansible_loop_var": "item", "changed": false, "cmd": "sshd -T -f /tmp/tmpAGtMcq", "item": {"line": "PasswordAuthentication no", "regexp": "^PasswordAuthentication"}, "msg": "[Errno 2] No such file or directory", "rc": 2} failed: [x.x.x.x] (item={u'regexp': u'^PermitRootLogin', u'line': u'PermitRootLogin no'}) => {"ansible_loop_var": "item", "changed": false, "cmd": "sshd -T -f /tmp/tmp4W8JFX", "item": {"line": "PermitRootLogin no", "regexp": "^PermitRootLogin"}, "msg": "[Errno 2] No such file or directory", "rc": 2} failed: [x.x.x.x] (item={u'regexp': u'^PermitRootLogin', u'line': u'PermitRootLogin no'}) => {"ansible_loop_var": "item", "changed": false, "cmd": "sshd -T -f /tmp/tmpNO0KfI", "item": {"line": "PermitRootLogin no", "regexp": "^PermitRootLogin"}, "msg": "[Errno 2] No such file or directory", "rc": 2}

I am not sure why this is happening. Any ideas?

I have done a little more investigation, but this is not happening always, other issues such as

ok: [x.x.x.4] => (item={u'regexp': u'^PermitEmptyPasswords', u'line': u'PermitEmptyPasswords no'})
ok: [x.x.x.5] => (item={u'regexp': u'^PermitEmptyPasswords', u'line': u'PermitEmptyPasswords no'})
ok: [x.x.x.4] => (item={u'regexp': u'^ChallengeResponseAuthentication', u'line': u'ChallengeResponseAuthentication no'})
ok: [x.x.x.5] => (item={u'regexp': u'^ChallengeResponseAuthentication', u'line': u'ChallengeResponseAuthentication no'})

I do not see any reason why this would happen, some failing and some not.

commented

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

commented

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

I'm seeing this same behavior when I run this role on a raspberry pi (it seems to work fine on an Intel machine, however):

image