0

I have installed ansible and created new users for controller and remote hosts. Have set up the below steps, but getting error, can anyone suggest ??

  1. Entered user using visudo, for both controller and client.

kt-ansible ALL=(ALL) NOPASSWD: ALL

  1. Changed permit root login to yes and password auth to yes in sshd_config on remote host & restart sshd service.

Getting an error like below while copying the pub keys to remote host.

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Any other change required on sshd_config file ? Additionally I tried to setup permitrootlogin to yes and pubkeyauthentication to yes as well.

Many Thanks, Piyush

3
  • please provide the output of ansible-playbook [your-cli parameters] -vvvv So we can see the users and details that you configured on your machine. Commented May 5 at 12:12
  • I do not have any playbook defined, so what you can suggest ? Commented May 7 at 14:45
  • Then the description of your problem is not clear. Please write it again with more details. Commented May 7 at 15:32

1 Answer 1

0

To get started with pubkeyauthentication you'll need passwordauthentication yes until you can login with keys.

Ensure to use ssh-copy-id to install you public key.

Note: Setting permitrootlogin yes goes against the use of sudo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .