我正在尝试从一台服务器连接到另一台服务器.实际上我正试图从docker容器中连接到我的主机操作系统(CoreOS).我已经设置了一个RSA密钥,当使用标准命令行连接到远程主机时,它就像一个魅力.它按预期工作.
当我试图跑步时,ansible customercare -m ping --user=core --connection=ssh --private-key=/home/jenkins/.ssh/id_rsa我遇到了这个错误
10.45.1.107 | FAILED => SSH在连接期间遇到未知错误.我们建议您使用-vvvv重新运行该命令,该命令将启用SSH调试输出以帮助诊断问题
详细选项如下所示:
<10.45.1.107> ESTABLISH CONNECTION FOR USER: core
<10.45.1.107> REMOTE_MODULE ping
<10.45.1.107> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/root/.ansible/cp/ ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'IdentityFile=/home/jenkins/.ssh/id_rsa', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=core', '-o', 'ConnectTimeout=10', '10.45.1.107', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1437988628.37-213828375275223 && chmod a+rx $HOME/. ansible/tmp/ansible-tmp-1437988628.37-213828375275223 && echo $HOME/.ansible/tmp/ansible-tmp-1437988628.37-213828375275223'"]
10.45.1.107 | FAILED => SSH encountered an unknown error. The output was:
OpenSSH_6.6.1, OpenSSL …Run Code Online (Sandbox Code Playgroud)