[Bug 1476] New: .ssh/known_hosts does not save port number

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Thu Jun 12 23:50:37 EST 2008


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

           Summary: .ssh/known_hosts does not save port number
    Classification: Unclassified
           Product: Portable OpenSSH
           Version: 5.0p1
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: ssh
        AssignedTo: unassigned-bugs at mindrot.org
        ReportedBy: parasietje at gmail.com


Problem: .ssh/known_hosts does not save the port number, only the
IP/hostname. Thus, multiple ssh-servers on the same IP will cause key
collisions.

Recreate:
Run sshd1 with certificate1 on port 2221
Run sshd2 with certificate2 on port 2222
Connect to localhost, port 2221.
    The server certificate is added to .ssh/known_hosts
Connect to localhost, port 2222
    Ssh reports REMOTE HOST KEY CHANGED

Expected behavior:
Ssh makes a difference between the ssh-server on port 2221, and the one
on port 2222.


Known workaround:
Use HostKeyAlias to define an alias for the host on port 2221, and for
the host on port 2222.


It would be a lot better if the port number were included in the
.ssh/known_hosts as well.

-- 
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