emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.50; pcmpl-ssh-hosts breaks when known_hosts file has a space in


From: Glenn Morris
Subject: Re: 23.0.50; pcmpl-ssh-hosts breaks when known_hosts file has a space in the wrong place
Date: Mon, 24 Mar 2008 16:28:06 -0400


Please let's keep this on the list.


Phil Hagelberg wrote (on Fri, 21 Mar 2008 at 11:28 -0700):

> Glenn Morris <address@hidden> writes:
> 
> >> The function pcmpl-ssh-hosts (which is invoked when you launch
> >> eshell and type "ssh host<tab>") fails when the last entry in your
> >> pcmpl-ssh-known-hosts-file has a space after the hostname instead of
> >> a comma.
> >
> > I don't understand what you mean. Do you mean they changed the format
> > from this:
> >
> > host1,host1a,host1b,... bits exponent modulus comment
> >
> > to this
> >
> > host1 host1a host1b ... bits exponent modulus comment
> 
> No, my understanding is that every line of the known_hosts file consists
> of either:
> 
> * A hostname, a separator, an IP address, a separator, then a
>   description of the key
> * An IP address, a separator, then a description of the key
> * A hostname, a separator, then a description of the key

I quote from `man sshd' on my RHEL5 system:

SSH_KNOWN_HOSTS FILE FORMAT

...

   Each line in these files contains the following fields: hostnames,
   bits, exponent, modulus, comment.  The fields are separated by spaces.

   Hostnames is a comma-separated list of patterns...

This is "OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006".

> The problem the patch addresses is that the separator can be a comma
> *or* a space. But it's not that complicated because what we really want
> is just whatever appears before the first separator.
> 
> I don't think we need to include the IP address for the first case above
> since I believe once you do refer to a host by its IP address, it will
> create another entry in the file that refers only to the IP address.

My own known_hosts file contains many entries like this:

host1.full.domain,host1,host1-alias,host-generic,ip1 ssh-rsa ...
host2.full.domain,host2,host2-alias,host-generic,ip2 ssh-rsa ...

There's nothing to say that the first entry is the only one I'll ever
want to complete on (indeed it's usually one of the other forms).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]