Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to connect to the host via ssh #1146

Closed
ThunderMerweS opened this issue Oct 10, 2018 · 3 comments
Closed

"Failed to connect to the host via ssh #1146

ThunderMerweS opened this issue Oct 10, 2018 · 3 comments

Comments

@ThunderMerweS
Copy link

Describe the bug
I have now set up 2 cloud service to try and see if that might gave been the problem, but still can seem to get pass a certain stage.

I am a complete novice at this so any help will be greatly appreciated.

To Reproduce

`(env) thundermerwe@GIGA-P34:/mnt/c/Algo321/algo-master$ ./algo

PLAY [Ask user for the input] *********************************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************************************************
ok: [localhost]
[pause]
What provider would you like to use?
1. DigitalOcean
2. Amazon EC2
3. Vultr
4. Microsoft Azure
5. Google Compute Engine
6. Scaleway
7. OpenStack (DreamCompute optimised)
8. Install to existing Ubuntu 18.04 server (Advanced)

Enter the number of your desired provider
:
1

TASK [pause] **************************************************************************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] ***************************************************************************************************************************************
ok: [localhost]
[pause]
Name the vpn server
[algo]
:
algo

TASK [pause] **************************************************************************************************************************************************************
ok: [localhost]
[pause]
Do you want macOS/iOS clients to enable "VPN On Demand" when connected to cellular networks?
[y/N]
:
n

TASK [pause] **************************************************************************************************************************************************************
ok: [localhost]
[pause]
Do you want macOS/iOS clients to enable "VPN On Demand" when connected to Wi-Fi?
[y/N]
:
n

TASK [pause] **************************************************************************************************************************************************************
ok: [localhost]
[pause]
Do you want to install a DNS resolver on this VPN server, to block ads while surfing?
[y/N]
:
y

TASK [pause] **************************************************************************************************************************************************************
ok: [localhost]
[pause]
Do you want each user to have their own account for SSH tunneling?
[y/N]
:
n

TASK [pause] **************************************************************************************************************************************************************
ok: [localhost]
[pause]
Do you want the VPN to support Windows 10 or Linux Desktop clients? (enables compatible ciphers and key exchange, less secure)
[y/N]
:
y

TASK [pause] **************************************************************************************************************************************************************
ok: [localhost]
[pause]
Do you want to retain the CA key? (required to add users in the future, but less secure)
[y/N]
:
y

TASK [pause] **************************************************************************************************************************************************************
ok: [localhost]

TASK [Set facts based on the input] ***************************************************************************************************************************************
ok: [localhost]

PLAY [Provision the server] ***********************************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************************************************
ok: [localhost]

--> Please include the following block of text when reporting issues:

Algo running on: Ubuntu 18.04.1 LTS
ZIP file created: 2018-10-07 17:33:54.000000000 +0200
Python 2.7.15rc1
Runtime variables:
algo_provider "digitalocean"
algo_ondemand_cellular "False"
algo_ondemand_wifi "False"
algo_ondemand_wifi_exclude "_null"
algo_local_dns "True"
algo_ssh_tunneling "False"
algo_windows "True"
wireguard_enabled "True"
dns_encryption "True"

TASK [Display the invocation environment] *********************************************************************************************************************************
changed: [localhost -> localhost]

TASK [Generate the SSH private key] ***************************************************************************************************************************************
ok: [localhost]

TASK [Generate the SSH public key] ****************************************************************************************************************************************
ok: [localhost]
[cloud-digitalocean : pause]
Enter your API token. The token must have read and write permissions (https://cloud.digitalocean.com/settings/api/tokens):
(output is hidden):

TASK [cloud-digitalocean : pause] *****************************************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : Set the token as a fact] ***********************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : Get regions] ***********************************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : Set facts about thre regions] ******************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : Set default region] ****************************************************************************************************************************
ok: [localhost]
[cloud-digitalocean : pause]
What region should the server be located in?
1. ams3 Amsterdam 3
2. blr1 Bangalore 1
3. fra1 Frankfurt 1
4. lon1 London 1
5. nyc1 New York 1
6. nyc3 New York 3
7. sfo2 San Francisco 2
8. sgp1 Singapore 1
9. tor1 Toronto 1

Enter the number of your desired region
[6]
:
6

TASK [cloud-digitalocean : pause] *****************************************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : Set additional facts] **************************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : Delete the existing Algo SSH keys] *************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : Upload the SSH key] ****************************************************************************************************************************
changed: [localhost]

TASK [cloud-digitalocean : Creating a droplet...] *************************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : set_fact] **************************************************************************************************************************************
ok: [localhost]

TASK [cloud-digitalocean : Tag the droplet] *******************************************************************************************************************************
ok: [localhost]
FAILED - RETRYING: Delete the new Algo SSH key (10 retries left).

TASK [cloud-digitalocean : Delete the new Algo SSH key] *******************************************************************************************************************
ok: [localhost]

TASK [Set subjectAltName as afact] ****************************************************************************************************************************************
ok: [localhost]

TASK [Add the server to an inventory group] *******************************************************************************************************************************
changed: [localhost]

TASK [Additional variables for the server] ********************************************************************************************************************************
changed: [localhost]

TASK [Wait until SSH becomes ready...] ************************************************************************************************************************************
ok: [localhost]

TASK [debug] **************************************************************************************************************************************************************
ok: [localhost] => {
"IP_subject_alt_name": "159.65.170.143"
}
Pausing for 20 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)

TASK [A short pause, in order to be sure the instance is ready] ***********************************************************************************************************
ok: [localhost]

PLAY [Configure the server and install required software] *****************************************************************************************************************
fatal: [159.65.170.143]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '159.65.170.143' (ECDSA) to the list of known hosts.\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n@ WARNING: UNPROTECTED PRIVATE KEY FILE! @\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\nPermissions 0777 for 'configs/algo.pem' are too open.\r\nIt is required that your private key files are NOT accessible by others.\r\nThis private key will be ignored.\r\nLoad key "configs/algo.pem": bad permissions\r\[email protected]: Permission denied (publickey).\r\n", "unreachable": true}

PLAY RECAP ****************************************************************************************************************************************************************
159.65.170.143 : ok=0 changed=0 unreachable=1 failed=0
localhost : ok=34 changed=4 unreachable=0 failed=0

(env) thundermerwe@GIGA-P34:/mnt/c/Algo321/algo-master$`

@davidemyers
Copy link
Contributor

This might be an issue with trying to run under /mnt when using WSL. Try again after installing Algo somewhere other than /mnt.

@ThunderMerweS
Copy link
Author

I think Windows is broken :)

Just did the whole thing on a spare Raspberry Pi with not a single hiccup.

Thanks for the response though, appreciate it.

This might be an issue with trying to run under /mnt when using WSL. Try again after installing Algo somewhere other than /mnt.

@TC1977
Copy link
Contributor

TC1977 commented Oct 10, 2018

It's a known WSL and /mnt/ issue. microsoft/WSL#81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants