我正在尝试使用OpenSSH和Ansible连接到我的Windows计算机。
我能够使用普通的ssh进行连接,但是当我尝试使用Ansible进行连接时,每当我改变某些东西时,我都会得到几乎相同的错误。如何使用openSSH和Ansible连接到WIndows节点?
我也试着运行Ansible为根,仍然没有
fatal: [IVU]: UNREACHABLE! => {"changed": false, "msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the remote directory. Consider changing the remote temp path in ansible.cfg to a path rooted in \"/tmp\". Failed command was: (umask 77 && mkdir -p \"` echo /tmp/ansible-tmp-1502794936.2073953-164132649383245 `\" && echo ansible-tmp-1502794936.2073953-164132649383245=\"` echo /tmp/ansible-tmp-1502794936.2073953-164132649383245 `\"), exited with result 1", "unreachable": true}
我试图在ansible.cfg的ssh_args改变ssh_args = -O ControlMaster =没有和输出没有变化制作。
我试过在ansible.cfg改变可执行文件到C:/Windows/System32/cmd.exe,我得到了同样的错误
我试图改变remote_dir =的/ tmp /和依然没有。
我ansible库存:
[IVU]
IVU ansible_host=**IP**
[IVU:vars]
ansible_port=22
ansible_user=**user**
ansible_ssh_pass=**pass**
ansible_ssh_private_key_file=** Keyfile **
好像它的失败之前,即使在运行任何任务,但是从Windows计算机上安装openssh的日志,我看不出有什么区别时ansible连接到它,当我ssh到它。
3724 09:27:38:720 error: Couldn't create pid file "C:\\Program Files\\OpenSSH\\sshd.pid": Permission denied
3724 09:27:41:376 Accepted publickey for **User** from **IP** port 42700 ssh2: RSA SHA256:clNmiKxygl/TLEb5Ob4lZs6JqztoQyxOsjMoHQ2HYgo
3724 09:27:58:533 Received disconnect from **IP** port 42700:11: disconnected by user
3724 09:27:58:533 Disconnected from user **User** **IP** port 42700
3360 09:28:41:398 error: Couldn't create pid file "C:\\Program Files\\OpenSSH\\sshd.pid": Permission denied
3360 09:28:41:616 Accepted publickey for **User** from **IP** port 42704 ssh2: RSA SHA256:clNmiKxygl/TLEb5Ob4lZs6JqztoQyxOsjMoHQ2HYgo
3360 09:28:41:741 Received disconnect from **IP** port 42704:11: disconnected by user
3360 09:28:41:741 Disconnected from user **User** **IP** port 42704
9:27是当我用ssh连接时,而9:28是当连接时。
有没有什么我想我需要改变Ansible才能在windows上使用openSSH?