ssh only with password

Bob Proulx bob at proulx.com
Thu Mar 25 05:07:18 EST 2004


Gert Doering wrote:
> Bob Proulx wrote:
> > > > Also, sometimes people do this with an text editor and accidentally
> > > > word wrap the file.  Therefore I recommend simply appending them with
> > > > the shell and cat.  These steps will correct any problems here.
> > > > 
> > > >   mv $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys.bak
> > > 
> > > make that a "cp"...
> > 
> > Negative.  Using 'cp' would not correct the problem with the original
> > file.  It would still be word wrapped.  So 'mv' is better if you are
> > trying to start again clean.
> 
> Well, I agree on that.  Even so, your example isn't really consistent in
> itself - the next line uses "cat $singlefile >>authorized_keys" - so
> you'll have only *one* key in there, and the ">>" is no different from
> ">".
> 
> That's why I assumed you meant "append new key to the end, but save the
> file in any case".

People tend to save snippets like that in files of notes and use them
later out of context by cut-n-paste.  My use of >> was just paranoia.
If later someone decides to use that line to add another key to the
file (after all, that is how they added the first key) then it won't
overwrite their file at that later time and possibly lock themselves
out of a system.

Bob




More information about the openssh-unix-dev mailing list