[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh-keygen

Douglas Allan Tutty wrote:
> On Thu, May 03, 2007 at 01:16:23AM -0400, KS wrote:
>> Greg Folkert wrote:
>>> On Thu, 2007-05-03 at 00:40 -0400, KS wrote:
>>>> The warning had following in it, is the :3 in the end the line number?
>>>> Add correct host key in /home/foobar/.ssh/known_hosts to get rid of this
>>>> message.
>>>> Offending key in /home/foobar/.ssh/known_hosts:3
>>> Line number 3.
>>> Remove that current line and you should be good.
>> Thanks. But I think ssh-keygen method is more elegant even though both
>> routes end up at the same place.
> How do you figure it's more elegant than using ed?
> I suppose it depends on how you define elegant.  
> Most of my time is spent on old hardware.  For me elegant is doing
> something with the fewest cycles.  Sed would be still more elegant but
> then we have to add the 'cycles' my poor brain has to do to figure out
> how to do it, plus the cycles to display sed's man page.  Ed or vi is a
> nice compromise.

(As Greg pointed out) *If ssh-keygen is available* and I get the warning
by ssh, all I need to do is give the command ssh-keygen -R $hostname
(where hostname can be used from the earlier command via up-arrow or
simple select+middle-click paste) and the host's entrie(s) are removed
form the known_hosts file. Thus for me ssh-keygen has lesser chances of
hosing my known_hosts file than vi or a sed command (which has the added
overhead of using head-cycles).

That is why I think it is elegant, not that I'm forcing others to do
that way too :)


Reply to: