IT/CLOUD(AWS,Azure,GCP,Docker)

ansible 에러 Failed to connect to the host via ssh: Permission denied

알콩달콩아빠 2023. 11. 19. 20:36
728x90
반응형

문제점

플레이북 실행시 아래와 같은 에러발생

TASK [Gathering Facts] ***********************************************************************************************************************************************************************
fatal: [x.x.x.x]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).", "unreachable": true}

 

해결방법

ansible 서버의 ~/.ssh/id_rsa.pub 값을 에러가난 원격지 서버의 ~/.ssh/authorized_key 파일에 저장한다.

 

출처 : ansible 에러 Failed to connect to the host via ssh: Permission denied (tistory.com)

728x90
반응형