Algo fails at task "check the system" due to incorrect permissions on /.ssh/config
OS / Environment
Bash on Windows 10
Ansible version
2.2.0.0
Summary of the problem
After creating the VM in Azure, Algo tries to SSH into the machine to install the VPN software. It fails with error Failed to connect to the host via ssh: OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014\r\nBad owner or permissions on /home/joshme/.ssh/config\r\n"
The owner needs to be changed with command chmod 664 ~/.ssh/config
Steps to reproduce the behavior
Run algo to deploy to Azure (I think this should be the same for other cloud services as well, but I'm using Azure). Go through all steps normally.
The way of deployment (cloud or local)
Cloud - Azure
Expected behavior
Algo should set up VPN software successfully after creating the VM
Actual behavior
Algo throws an error because it cannot SSH into the newly created VM.
Full log
PLAY [Configure the server and install required software] **********************
TASK [Check the system] ********************************************************
task path: /home/joshme/algo/playbooks/common.yml:3
<13.64.104.89> ESTABLISH SSH CONNECTION FOR USER: ubuntu
<13.64.104.89> SSH: EXEC ssh -vvv -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o ConnectTimeout=6 -o ConnectionAttempts=30 -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o 'IdentityFile="configs/algo.pem"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=60 -o ControlPath=/home/joshme/.ansible/cp/ansible-ssh-%h-%p-%r -tt 13.64.104.89 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-rdfsojsbdyrwivkibyikbpdilkapuurt; uname -a'"'"''
fatal: [13.64.104.89]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014\r\nBad owner or permissions on /home/joshme/.ssh/config\r\n",
"unreachable": true
}
This is not a problem with Algo
@dguido should we add something to the readme or the Windows steps telling people how to get around this? Can we set these perms as a prerequisite step or does the directory not exist before running ./algo?
This is a symptom of a broken installation of OpenSSH on your Windows box. I'm not sure how it got that way, but that's not the way it is initially installed. We already have a note in the troubleshooting guide about permissions problems with files in the .ssh folder. Additionally, the error messages when those permissions happen are pretty explanatory already. It spells out exactly what the problem is "bad permissions on
I think a lot of these problems will go away once we enforce that everyone uses Win 10 CU and higher.