Trimming SSH lines removes spaces from them
KamilaBorowska opened this issue · comments
In #165, trimming user keys was introduced. This appears to be buggy, removing spaces from keys.
$ line='ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK8rVxv/PJRJPXrsbaOL/aR7W9TPsGyjfV2Y+HutuDoH'
$ line=$(echo -n "$line" | sed 's/\r//g')
$ echo $line
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK8rVxv/PJRJPXrsbaOL/aR7W9TPsGyjfV2Y+HutuDoH
$ trimmed_line=$(echo -n "$line" | tr -d '[:space:]')
$ echo $trimmed_line
ssh-ed25519AAAAC3NzaC1lZDI1NTE5AAAAIK8rVxv/PJRJPXrsbaOL/aR7W9TPsGyjfV2Y+HutuDoH
Note how space was removed from SSH key after ssh-ed25519
making it unusable.
experiencing similar behavior which led to my machines being unusable. it's probably best to fork based off of the last known good commit hash and move forward.
i'm using this without issue.