Есть несколько удалённых машин. Добираться к ним нужно через 2 proxy_jamp-а. Безпарольный доступ настроен. На одной из машин не срабатывают ни плейбуки ни ad-hoc команды. Сначала пишет warnings:
[WARNING]: sftp transfer mechanism failed on [host1]. Use ANSIBLE_DEBUG=1 to see detailed information
[WARNING]: scp transfer mechanism failed on [host1]. Use ANSIBLE_DEBUG=1 to see detailed information
а потом ошибку:
host1 | UNREACHABLE! => {
"changed": false,
"msg": "SSH Error: data could not be sent to remote host \"host1". Make sure this host can be reached over ssh",
"unreachable": true
}
sftp и scp работают нормально. Ad-hoc с модулем raw работает нормально. В чём может быть проблема?
UPD Хм… А с модулем raw ad-hoc отрабатывает нормально.
UPD2 похоже no-dashi-v2 прав. Вот что нашёл в auth.log
подключение через sftp:
Feb 7 09:10:31 host1 sshd[19802]: Accepted publickey for user from xxx.xxx.xxx.xxx port 49915 ssh2: RSA SHA256:mnogabukafWSF4
Feb 7 09:10:31 host1 sshd[19802]: pam_unix(sshd:session): session opened for user user by (uid=0)
Feb 7 09:10:31 host1 systemd-logind[540]: New session 1517 of user user.
Feb 7 09:10:37 host1 sshd[19924]: Received disconnect from xxx.xxx.xxx.xxx port 49915:11: disconnected by user
Feb 7 09:10:37 host1 sshd[19924]: Disconnected from xxx.xxx.xxx.xxx port 49915
Feb 7 09:10:37 host1 sshd[19802]: pam_unix(sshd:session): session closed for user user
Feb 7 09:10:37 host1 systemd-logind[540]: Removed session 1517.
А вот это после ansible -m ping
Feb 7 09:11:48 host1 sshd[28580]: Accepted publickey for user from xxx.xxx.xxx.xxx port 40795 ssh2: RSA SHA256:mnogabukafWSF4
Feb 7 09:11:48 host1 sshd[28580]: pam_unix(sshd:session): session opened for user user by (uid=0)
Feb 7 09:11:48 host1 systemd-logind[540]: New session 1518 of user user.
Feb 7 09:12:05 host1 sshd[28702]: Corrupted MAC on input.
Feb 7 09:12:05 host1 sshd[28702]: ssh_dispatch_run_fatal: Connection from xxx.xxx.xxx.xxx port 40795: message authentication code incorrect
Feb 7 09:12:05 host1 sshd[28580]: pam_unix(sshd:session): session closed for user user
Feb 7 09:12:05 host1 systemd-logind[540]: Removed session 1518.
Feb 7 09:12:09 host1 sshd[31001]: Accepted publickey for user from xxx.xxx.xxx.xxx port 40829 ssh2: RSA SHA256:mnogabukafWSF4
Feb 7 09:12:09 host1 sshd[31001]: pam_unix(sshd:session): session opened for user user by (uid=0)
Feb 7 09:12:09 host1 systemd-logind[540]: New session 1519 of user user.
Feb 7 09:12:10 host1 sshd[31123]: Corrupted MAC on input.
Feb 7 09:12:10 host1 sshd[31123]: ssh_dispatch_run_fatal: Connection from xxx.xxx.xxx.xxx port 40829: message authentication code incorrect
Feb 7 09:12:10 host1 sshd[31001]: pam_unix(sshd:session): session closed for user user
Feb 7 09:12:10 host1 systemd-logind[540]: Removed session 1519.
Feb 7 09:12:15 host1 sshd[31606]: Accepted publickey for user from xxx.xxx.xxx.xxx port 40838 ssh2: RSA SHA256:mnogabukafWSF4
Feb 7 09:12:15 host1 sshd[31606]: pam_unix(sshd:session): session opened for user user by (uid=0)
Feb 7 09:12:15 host1 systemd-logind[540]: New session 1520 of user user.
Feb 7 09:12:16 host1 sshd[31848]: Corrupted MAC on input.
Feb 7 09:12:16 host1 sshd[31848]: ssh_dispatch_run_fatal: Connection from xxx.xxx.xxx.xxx port 40838: message authentication code incorrect
Feb 7 09:12:16 host1 sshd[31606]: pam_unix(sshd:session): session closed for user user
Feb 7 09:12:16 host1 systemd-logind[540]: Removed session 1520.
Поиск продолжается.