unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Hagelberg <phil@evri.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Pcompletion for ssh and scp
Date: Wed, 05 Dec 2007 12:16:29 -0800	[thread overview]
Message-ID: <85zlwolwwy.fsf@evri.com> (raw)
In-Reply-To: <jwvd4tl51w8.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 04 Dec 2007 21:10:34 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> All my known_hosts files have "hostnames" that are encoded in the
> following way:
>
>    |1|bXOTR5GrVkVH4ABavbfZ7f2G0EQ=|drXHp56kwVXBTdc/f92649SXiTw=
>
> I don't know how widespread this is, but I haven't made anything special
> to get them: I'm using the standard Debian package without any special
> configuation in this respect, so for your feature to be useful I think
> it needs to handle this case.

Yeah, I mentioned this in the header of the file but forgot to include a
note in my email:

;;; Commentary:

;; This will allow eshell to autocomplete SSH hosts from the list of
;; known hosts in your ~/.ssh/known_hosts file. Note that newer
;; versions of ssh hash the hosts by default to prevent Island-hopping
;; SSH attacks. (https://itso.iu.edu/Hashing_the_OpenSSH_known__hosts_File)
;; You can disable this by putting the following line in your ~/.ssh/config
;; file following the "Host *" directive:

;; HashKnownHosts no

;; Note that this will make you vulnerable to the Island-hopping
;; attack described in the link above if you allow key-based
;; passwordless logins and your account is compromised.

I don't think there's any way to "handle this case" other than making
the user turn off the "hash all hostnames" feature since it is meant to
be one-way to prevent island-hopping attacks. I would like to remove
hashed entries, but I'm not sure if there's a reliable programmatic way
to distinguish them from actual hostnames. I suppose it could assume
that any entry over a certain length is likely to be garbage, but I'd
rather not do that if there's a better way. Any suggestions?

It's a simple fix, but it requires user intervention. I think recent
Debians and derivatives hash by default; not sure what else does.

-Phil

  parent reply	other threads:[~2007-12-05 20:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 22:32 Pcompletion for ssh and scp Phil Hagelberg
2007-12-05  2:10 ` Stefan Monnier
2007-12-05  6:27   ` Manoj Srivastava
2007-12-05 14:32     ` Stefan Monnier
2007-12-05 20:16   ` Phil Hagelberg [this message]
2007-12-06  0:07     ` Glenn Morris
2007-12-06  1:22       ` Phil Hagelberg
2007-12-06  2:22         ` Glenn Morris
2007-12-06 17:46           ` Phil Hagelberg
2008-02-08  5:17             ` Glenn Morris
2007-12-07 18:39 ` Edward O'Connor
2007-12-07 19:09   ` Phil Hagelberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85zlwolwwy.fsf@evri.com \
    --to=phil@evri.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).