PROTIP: are you getting ssh errors about host identification failed? Not a problem! Simply run true > ~/.ssh/known_hosts

Follow

@swaggboi
Important to note that many systems have "noclobber" option enabled in systemwide bashrc, that prevents overwriting files by redirecting output to them.
In this case you have to use ">|" to force overwriting, so it would be "true >| ~/.ssh/known_hosts".
Here is what looks like a nice article explaining this in a bit more detail: geeksforgeeks.org/how-to-prote

@m0xee On my systems all it takes is something like > /etc/fstab but shellcheck will complain if you don’t explicitly run true before the redirect (and as you can tell, I’m one who adheres to best practices!)

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml