[Bug 2479] New: ssh-keyscan non-standard port broken

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue Oct 13 08:16:31 AEDT 2015


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

            Bug ID: 2479
           Summary: ssh-keyscan non-standard port broken
           Product: Portable OpenSSH
           Version: 6.9p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh-keyscan
          Assignee: unassigned-bugs at mindrot.org
          Reporter: micah at riseup.net

If one passes the -p option for a non-standard port to ssh-keyscan when
using the -f option to pull hosts from a file, it results in a
known_hosts entry that is incorrect:

micah at muck$ cat /tmp/try 
199.254.238.47 micah.riseup.net,199.254.238.47

micah at muck$ ssh-keyscan -t rsa -p 4422 -f /tmp/try > /tmp/known

micah at muck$ cat /tmp/known
[micah.riseup.net,199.254.238.47]:4422 ssh-rsa DATA

It seems like putting a list of hostnames,ips inside of the [] doesn't
work:

micah at muck:dotfiles$ ssh -oUserKnownHostsFile=/tmp/known
micah at micah.riseup.net -p 4422
The authenticity of host '[micah.riseup.net]:4422
([199.254.238.47]:4422)' can't be established.
RSA key fingerprint is
SHA256:CbHIxWJjFKJk5V+G09XeiABqIRTooC646ZfSl7FRp2w.
Are you sure you want to continue connecting (yes/no)?

It should be constructed like this:

[micah.riseup.net]:4422,[199.254.238.47]:4422 ssh-rsa DATA

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list