Cyberduck Mountain Duck CLI

#10772 closed defect (fixed)

"known_hosts" records incorrect SFTP address for servers with non-22 ports

Reported by: xupaddy Owned by: dkocher
Priority: normal Milestone: 7.1
Component: sftp Version: 7.0.1
Severity: normal Keywords:
Cc: Architecture: Intel
Platform: macOS 10.14

Description

Hi,

In Cyberduck 7.0.2, the ~/.ssh/known_hosts file will not record SFTP server's port number, invalids the "Remember Server Signature" function. Here is the procedure to reproduce:

  1. Connect to an SFTP server that has a non-standard port, let's say "ssh.example.com:54321".
  2. Cyberduck asks you whether to remember this server signature. Choose "Always".
  3. Find a new line in the ~/.ssh/known_hosts file:
    ssh.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJRw0CtHEseIIU/6OUf/NYNKXPs5tCu6EfwUty3bzZcm
    
  4. Disconnect the server and repeat Step 1. Now Cyberduck asks you again for saving the signature. Choose "Always" again.
  5. Now there are two duplicate lines in ~/.ssh/known_hosts file:
    ssh.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJRw0CtHEseIIU/6OUf/NYNKXPs5tCu6EfwUty3bzZcm
    ssh.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJRw0CtHEseIIU/6OUf/NYNKXPs5tCu6EfwUty3bzZcm
    

This bug does not exist in Cyberduck 7.0.1. In this version, the following line is added to ~/.ssh/known_hosts when you choose to remember the signature:

[ssh.example.com]:54321 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJRw0CtHEseIIU/6OUf/NYNKXPs5tCu6EfwUty3bzZcm

which is correct. Cyberduck will not ask you to remember it again during the second connection.

You can see that the missing PORT number in Cyberduck 7.0.2 causes this bug.

Change History (3)

comment:1 Changed on Aug 5, 2019 at 2:48:14 PM by dkocher

  • Milestone set to 7.1
  • Owner set to dkocher
  • Status changed from new to assigned
  • Version set to 7.0.1

comment:2 Changed on Aug 6, 2019 at 1:54:56 PM by dkocher

  • Resolution set to fixed
  • Status changed from assigned to closed

In r47450.

comment:3 Changed on Sep 6, 2019 at 8:56:04 AM by dkocher

#10796 closed as duplicate.

Note: See TracTickets for help on using tickets.
swiss made software