-
Notifications
You must be signed in to change notification settings - Fork 521
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
Dangerous command in k3s.sh #62
Comments
Luckily I searched existing issues before suggesting the same change. Of note is that this same line is actually in multiple scripts, sometimes twice (local machine - and then sometimes run on the remote machine too):
|
Good spot, I'll amend that now. Thanks |
I see there were some updates. I realised that technically there is still a potential problem introduced by the change. If the file exists, the old behaviour would wipe it. If the file doesn't exist, the new behaviour results in an error. 🫣 I don't know how complex or edge-case-proof you want the scripts to be - but perhaps putting these security-reducing lines into the ssh config is actually a bad idea compared to just importing the keys:
The first line makes sure the .ssh folder exists. It gives no output or errors unless the folder didn't exist and it was unable to create it. |
Command in script
echo "StrictHostKeyChecking no" > ~/.ssh/config
destroying your config file for SSH. :(
Please change to
sed -i '1s/^/StrictHostKeyChecking no\n/' ~/.ssh/config
The text was updated successfully, but these errors were encountered: