hcloud provider: ssh: unable to authenticate
michaelbagrov opened this issue · comments
Hello,
Thank you for this project, it is awesome! But I run into problem I can't resolve.
When trying to provision hcloud server it stuck on connecting to newly created server.
Here is output of terraform:
module.provider.hcloud_server.host: Creating...
datacenter: "" => "<computed>"
image: "" => "ubuntu-16.04"
ipv4_address: "" => "<computed>"
ipv6_address: "" => "<computed>"
ipv6_network: "" => "<computed>"
keep_disk: "" => "false"
location: "" => "nbg1"
name: "" => "node-1"
server_type: "" => "cx11"
ssh_keys.#: "" => "1"
ssh_keys.0: "" => "work"
status: "" => "<computed>"
module.provider.hcloud_server.host: Still creating... (10s elapsed)
module.provider.hcloud_server.host: Still creating... (20s elapsed)
module.provider.hcloud_server.host: Provisioning with 'remote-exec'...
module.provider.hcloud_server.host (remote-exec): Connecting to remote host via SSH...
module.provider.hcloud_server.host (remote-exec): Host: 159.69.206.29
module.provider.hcloud_server.host (remote-exec): User: root
module.provider.hcloud_server.host (remote-exec): Password: false
module.provider.hcloud_server.host (remote-exec): Private key: false
module.provider.hcloud_server.host (remote-exec): SSH Agent: false
module.provider.hcloud_server.host (remote-exec): Checking Host Key: false
.....
module.provider.hcloud_server.host: Still creating... (5m0s elapsed)
module.provider.hcloud_server.host: Still creating... (5m10s elapsed)
module.provider.hcloud_server.host (remote-exec): Connecting to remote host via SSH...
module.provider.hcloud_server.host (remote-exec): Host: 159.69.206.29
module.provider.hcloud_server.host (remote-exec): User: root
module.provider.hcloud_server.host (remote-exec): Password: false
module.provider.hcloud_server.host (remote-exec): Private key: false
module.provider.hcloud_server.host (remote-exec): SSH Agent: false
module.provider.hcloud_server.host (remote-exec): Checking Host Key: false
module.provider.hcloud_server.host: Still creating... (5m20s elapsed)
Error: Error applying plan:
1 error(s) occurred:
* module.provider.hcloud_server.host: timeout - last error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
as displayed above I'm passing work ssh key to ssh_keys of "hcloud_server" "host" resource, this key is also added to hetzner account and I can ssh to server. So it seems that remote-exec do not use key work.
I'm using 0.11.10 version of terraform and 1.4.0 of hcloud provider.
resolved by running ssh-add