0

I have SSH access for a particular server, but when I am trying to run the playbook for that server. I am trying to do the deployment for that server but I'm facing an issue.

fatal: [lapp999.corp.com]]: UNREACHABLE! => {"changed": false, "msg": "Data could not be sent to remote host \"lapp999.corp.com\". Make sure this host can be reached over ssh: ********************************************************************************\n                             
!!!WARNING!!!\n********************************************************************************\nThis system is a restricted access system. All activity on this system is\nsubject to monitoring. Information collected that is malicious, unauthorized or\nunlawful, may be provided to the relevant authorities for further action. By\ncontinuing past this point, you expressly consent to this monitoring.\n********************************************************************************\
[email protected]: Permission denied (publickey).\r\n", "unreachable": true}

Can someone please assist to fix this one?

3
  • 2
    The issue is Permission denied (publickey). May 31, 2023 at 8:41
  • But i have the access for that server , i am able to do ssh @GeraldSchneider
    – Varun K M
    May 31, 2023 at 8:46
  • 2
    Then check the verbose output of the connection attempt along with the logs on the server May 31, 2023 at 8:56

1 Answer 1

0

ansible-playbook -vvv Verbosity 3 starts printing commands run, including the ssh command line. Compare this to the ssh command you claim is working interactively.

Check if IdentityFile should be set for this host in ssh_config and if so to which credential.

Ansible's default is to not use interactive ssh options. If you were to need a password, would need to provide that via --ask-pass on the command line, or set variable ansible_password And have the sshpass program installed, because OpenSSH really doesn't want you to automate passwords.

You must log in to answer this question.

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