Ssh 如何在私有IP上运行ansible playbook?

Ssh 如何在私有IP上运行ansible playbook?,ssh,ansible,devops,azure-vm,superuser,Ssh,Ansible,Devops,Azure Vm,Superuser,我的任务是在私有ip上安装Docker。有两个azure虚拟机,一个具有公共IP,另一个具有私有IP。如何从第一台机器到第二台机器启动剧本? 第一台虚拟机- 第二项是— 通过命令ansible 10.0.1.5-m ping尝试 但最终还是出现了这样一个问题 host |无法访问!=>{“changed”:false,“msg”:“ERROR!SSH遇到未知错误。输出为:\nOpenSSH_7.2p2 Ubuntu-4ubuntu2.10,OpenSSL 1.0.2g 2016年3月1日\r\n

我的任务是在私有ip上安装Docker。有两个azure虚拟机,一个具有公共IP,另一个具有私有IP。如何从第一台机器到第二台机器启动剧本? 第一台虚拟机- 第二项是—

通过命令
ansible 10.0.1.5-m ping尝试

但最终还是出现了这样一个问题

host |无法访问!=>{“changed”:false,“msg”:“ERROR!SSH遇到未知错误。输出为:\nOpenSSH_7.2p2 Ubuntu-4ubuntu2.10,OpenSSL 1.0.2g 2016年3月1日\r\ndebug1:读取配置数据/etc/SSH/SSH_config\r\ndebug1:/etc/SSH/SSH_配置第19行:应用*\r\ndebug1:自动mux:尝试现有主\r\ndebug1:控制套接字\”/home/adminuser/.ansible/cp/ansible-ssh-10.0.1.5-22-root\“不存在\r\n错误2:解析\“10.0.1.5\”端口22\r\n错误2:ssh\u connect\u direct:needpriv 0\r\n错误1:连接到10.0.1.5[10.0.1.5]端口22。\r\ndebug2:fd 3设置O_NONBLOCK\r\ndebug1:fd 3清除O_NONBLOCK\r\ndebug1:连接已建立。\r\ndebug3:超时:连接后剩余9999毫秒\r\ndebug1:标识文件/home/adminuser/.ssh/id\r\n rsa类型1\r\ndebug1:密钥加载\r\n公共:无此类文件或目录\r\ndebug1:标识文件/home/adminuser/.ssh/id\r\n rsa-cert类型-1\r\nebug1:key\u load\u public:没有这样的文件或目录\r\ndebug1:identity file/home/adminuser/.ssh/id\u dsa type-1\r\ndebug1:key\u load\u public:没有这样的文件或目录\r\ndebug1:identity file/home/adminuser/.ssh/id\u dsa-cert type-1\r\ndebug1:key\n加载\r\n没有这样的文件或目录\r\ndebug1:identity file/home/adminuser/.ssh/id\n ecdsa type-1\r\r\ndebug1:key\u load\u public:没有这样的文件或目录\r\ndebug1:identity file/home/adminuser/.ssh/id\u ecdsa-cert type-1\r\ndebug1:key\u load\u public:没有这样的文件或目录\r\ndebug1:identity file/home/adminuser/.ssh/id\u ed25519 type-1\r\ndebug1:key\u load\u public:没有这样的文件或目录\r\ndebug1:identity file/home/adminuser/.ssh/id\u ed25519-cert type-1\r\ndebug1:为协议2.0启用兼容模式\r\ndebug1:本地版本字符串SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10\r\ndebug1:远程协议版本2.0,远程软件版本OpenSSH_7.2p2 Ubuntu-4UBUNTUNU.10\r\ndebug1:匹配:OpenSSH_7.2p2 Ubuntu-4UBUNTUUNTUNU.10 pat OpenSSH*compat 0x0400000\r\ndebug2:fd 3设置O_非块\r\ndebug1:验证到10.0.1.5:22作为“根”\r\ndebug3:主机密钥\u foreach:读取文件\“/home/adminuser/.ssh/known\u hosts\"\r\ndebug3:record\u hostkey:在文件/home/adminuser/.ssh/known\u hosts:1\r\ndebug3:load\u hostkeys:从10.0.1.5加载1个密钥\r\ndebug3:order\u hostkeyalgs:首选hostkeyalgs:ECDSA-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521\r\ndebug3:发送数据包:类型20\r\ndebug1:SSH2\u MSG\u KEXINIT发送\r\ndebug3:接收数据包:类型20\r\ndebug1:SSH2\u MSG\u KEXINIT接收\r\ndebug2:本地客户端KEXINIT建议\r\ndebug2:KEX算法:curve2519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman群交换e-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c\r\n数据库2:主机密钥算法:ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh rsa证书-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\n密码ctos:chacha20-poly1305@openssh.com,aes128中心,aes192中心,aes256中心,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128 cbc,aes192 cbc,aes256 cbc,3des cbc\r\n错误2:密码stoc:chacha20-poly1305@openssh.com,aes128中心,aes192中心,aes256中心,aes128-gcm@openssh.com,aes256-gcm@openssh.com、aes128 cbc、aes192 cbc、aes256 cbc、3des cbc\r\n故障2:MACs CTO:umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\n数据库2:MACs stoc:umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\n错误2:压缩CTO:zlib@openssh.com,zlib,无\r\n错误2:压缩stoc:zlib@openssh.com,zlib,无\r\n数据库2:语言CTO:\r\n数据库2:语言stoc:\r\ndebug2:第一个\u kex\u跟在0后面\r\ndebug2:保留的0\r\ndebug2:对等服务器KEXINIT提案\r\ndebug2:kex算法:Curve2519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1\r\ndebug2:主机密钥算法:ssh rsa,rsa-sha2-512,rsa-sha2-256,ecdsa sha2-nistp256,ssh-ed25519\r\n错误2:密码CTO:chacha20-poly1305@openssh.com,aes128中心,aes192中心,aes256中心,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\n错误2:密码stoc:chacha20-poly1305@openssh.com,aes128中心,aes192中心,aes256中心,aes128-gcm@openssh.com,aes256-gcm@openssh.com\r\n错误2:MAC CTO:umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\n数据库2:MACs stoc:umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\n错误2:压缩CTO:无,zlib@openssh.com\r\n错误2:压缩stoc:无,zlib@openssh.com\r\ndebug2:语言CTO:\r\ndebug2:语言stoc:\r\ndebug2:第一个\u kex\u后跟0\r\ndebug2:保留的0\r\ndebug1:kex:算法:Curve2519-sha256@l