Would a carriage return ^M in SSH key make a difference?
I cloned a git repo to a server that had same files scattered in different places. Then I compared two directories (cloned one to existing one) to make sure that they were exactly the same. The
comp command showed that there is only one difference and that is in an ssh key on the remote server files. There is carriage return
^M present in the remote file. Would that change the key? If yes, how can I remove the carriage return in vim.
No carriage returns are allowed so use substitution to remove them:
Don’t just copy the above; to insert the control character
^M you have to press Ctrl+V and then Ctrl+M (otherwise if you copy-paste you will just insert the two characters ^M and you will get
Pattern not found).
If the whole file instead was recognized as
dos type, the following would also work:
fileformat to unix, save and quit).