Re: ssh-keygen



Allan Wind wrote:
On 2007-05-02T23:10:07-0400, KS wrote:
However, ssh-keygen gives me the exact same output if I try to do it
again even though the host does not exist in the file (same output with
-v flag). Shouldn't it give a more informative output like: host entry
not found in known_hosts file? Or am I missing something.

So you did the following? If not give it a try where ... is hostname in
question:

hostname=...
ssh-keygen -R $hostname
ssh $hostname


Yup, that is exactly what I did and on doing ssh $hostname I got the
usual warning of authenticity of host $hostname (xxx.xxx.xxx.xxx) can't
be established. ...etc...etc.

That works fine. However, it is ssh-keygen which I think should return
something intelligent if it doesn't find a hostname entry to remove from
the known_hosts file. Below is what I get if I try to remove a
non-existent hostname listing:

00:09:15 {~} $> ssh-keygen -F hohoho.hahaha
00:10:16 {~} $>
00:09:18 {~} $> ssh-keygen -R hohoho.hahaha
/home/foobar/.ssh/known_hosts updated.
Original contents retained as /home/foobar/.ssh/known_hosts.old


So ssh-keygen does not return anything if it doesn't find a hostname
entry, and if asked to remove the same it says that the file was updated!!

/KS


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: hostnames and interfaces
    ... Apache documentation on doing virtual hosts and maybe do some ... A fully Qualified Host Name consists of two main parts. ... During installation, when it asks for hostname, it wants a Fully ... service what DNS server will be providing DNS service for that domain. ...
    (freebsd-questions)
  • Re: /bin/hostname
    ... Find a real news server. ... in /etc/hosts that maps the host and the FQDN to the static IP ... Linux distributions are supposed to follow Linux Standard Base standards, ... hostname -- show or set the system's host name ...
    (comp.os.linux.networking)
  • RE: apache not starting: FreeBSd 5.4
    ... Assigning a Host name to your FBSD system. ... statement hostname= to /etc/rc.conf. ... registered domain name on the public Internet (unless of course it's ...
    (freebsd-questions)
  • Re: mail confusion
    ... On Sun, 2005-10-30 at 12:06 -0500, Derek Martin wrote: ... > - change the hostname of your machine to something in a real domain ... This host has a dynamic IP. ... Evolution is configured to use sendmail on this ...
    (Fedora)
  • Re: /bin/hostname
    ... internet server with a static IP address, and there needs to be a line ... in /etc/hosts that maps the host and the FQDN to the static IP ... Linux distributions are supposed to follow Linux Standard Base standards, ... hostname -- show or set the system's host name ...
    (comp.os.linux.networking)