Closed cmantsch closed 1 year ago
@cmantsch Please make sure you follow the SSH doc. Then destroy, and apply again (because after a few bad tries your IP gets blacklisted in the running node itself), so destroy before re-applying is essential.
Make sure you do not block the SSH port in the additional ssh rules in your kube.tf.
Also, there are tons of closed issues so if the case does not work, search for those.
I followed the SSH docs, tried out with directly referring to the public/private key files and also using ssh agent and inline public key. Also always started over from scratch: deleted everything manually in hetzner console (since destroy didn't work due to inconsistent state) and deleted the terraform state.
Then I noticed, that it says Warning: Identity file /tmp/rz8b7wb2ncgvpg3n00j1 not accessible: No such file or directory.
in the terraform logs, but listing the /tmp directory had the file 'rz8b7wb2ncgvpg3n00j1'$'\r'
in it. Probably this was due to me having run terraform init
in Windows and then copied over the project folder to the WSL file system.
Removed the terraform modules/providers and ran init again in WSL - works like a charm now.
Thanks for your reply anyway! :-)
Well done!! That was great debugging @cmantsch!! 🚀🚀
I followed the SSH docs, tried out with directly referring to the public/private key files and also using ssh agent and inline public key. Also always started over from scratch: deleted everything manually in hetzner console (since destroy didn't work due to inconsistent state) and deleted the terraform state.
Then I noticed, that it says
Warning: Identity file /tmp/rz8b7wb2ncgvpg3n00j1 not accessible: No such file or directory.
in the terraform logs, but listing the /tmp directory had the file'rz8b7wb2ncgvpg3n00j1'$'\r'
in it. Probably this was due to me having runterraform init
in Windows and then copied over the project folder to the WSL file system.Removed the terraform modules/providers and ran init again in WSL - works like a charm now.
Thanks for your reply anyway! :-)
Had the same issue. WSL seems to be the issue here. Never issued the command in Windows, only in WSL.
Had to use: find .terraform -type f -print0 | xargs -0 dos2unix
to make it work. Issue here, files are in CRLF and terraform in WSL has issues with that. After dos2unix, files are in LF and now it works.
@KaiGrassnick Super useful info, thanks for sharing!
I wanted to deploy a new cluster, but after the following logs the process gets stuck
From what I can tell, there seems to be an issue with the private key, therefore the script falls back to password authentication and waits at the password prompt forever.
I generated the ssh keys with
ssh-keygen -t ed25519 -f id_ed25519_hcloud.pub
(in Ubuntu 20.04 WSL) and set it as follows in configurationAlready tried chmoding it to either 600 (with my user being the owner) and 777, which changed nothing.
Am I missing something here?