[Bug 1947] New: Log authorized_keys format issues and refuse to accept keys

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Mon Oct 31 05:02:55 EST 2011


https://bugzilla.mindrot.org/show_bug.cgi?id=1947

             Bug #: 1947
           Summary: Log authorized_keys format issues and refuse to accept
                    keys
    Classification: Unclassified
           Product: Portable OpenSSH
           Version: 5.8p1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: sshd
        AssignedTo: unassigned-bugs at mindrot.org
        ReportedBy: dave at treblig.org


I was trying to add a command="blah" limit on a key in
.ssh/authorized_keys for the first time in many years; and a few
problems struck me:

1) When I screwed up there was no log to say that it hit a badly
formatted line in authorized_keys
2) A simple error - e.g. putting a line break after the command="..."
part and before the key resulted in a key with no restriction.

So I suggest if you find a command="....." or other option section that
should be with a key and there is no key, then it should be logged that
you hit it and you should stop reading the authorized_keys file because
something is wrong.

Ideally you should carry on reading the authorized_keys to check its
validity, even once you hit a valid entry, that way you can spot other
screwups - e.g. in my case I first misread the man page to think I was
supposed to put the command="..." on the following line.

OK, so you're not going to be able to catch all screwups; but it should
be pretty paranoid.

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list