I am able to ping ansible nodes/target machine on aws ec2 as root but not as any user on the controller/master

e.g i create a user “student” on controller-node/master and i try this command “ansible all -m ping” its not working

i get this error:

node1 | UNREACHABLE! => { “changed”: false, “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).”, “unreachable”: true }

node1 is target/slave machine


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!