Re:Why does my SSH private key still work after changing som...
by myself248 on Saturday December 31, 2022 @06:28AM
(#34195481)
I think it does, insofaras OSs feel free to just fuck with the contents of files they think are text, replacing newlines willy-nilly. Files not identified as text are safe from such automatic tampering.
[ Parent
| on HN ]
Re:Why does my SSH private key still work after changing som...
by MayeulC on Saturday December 31, 2022 @06:36AM
(#34195540)
I've never seen this behaviour at an OS level. This seems like an editor issue, and binary files are not exempt from being messed up by a slightly incompatible editor, far from it.
Re:Why does my SSH private key still work after changing som...
by nemetroid on Saturday December 31, 2022 @06:48AM
(#34195604)
Perhaps you have been spared from writing code for Windows:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/refe...
> In text mode, carriage return-line feed (CRLF) combinations are translated into single line feed (LF) characters on input, and LF characters are translated to CRLF combinations on output.
Re:Why does my SSH private key still work after changing som...
by Dylan16807 on Saturday December 31, 2022 @06:59AM
(#34195689)
Is there a reason I should blame the OS specifically and not the C runtime?
Re:Why does my SSH private key still work after changing som...
by nemetroid on Saturday December 31, 2022 @08:03AM
(#34196082)
I guess it depends on how specific you want to be. The Windows C runtime is a component of the OS.
Re:Why does my SSH private key still work after changing som...
by Dylan16807 on Saturday December 31, 2022 @08:49AM
(#34196384)
Well you're not really supposed to use the OS copy of msvcrt.dll
Re:Why does my SSH private key still work after changing som...
by tedunangst on Saturday December 31, 2022 @01:03PM
(#34198927)
Yes, library functions do what you ask them to do.