Cyberduck Mountain Duck CLI

#3013 closed defect (worksforme)

known_hosts not read properly

Reported by: PeterNSteinmetz Owned by: dkocher
Priority: normal Milestone:
Component: sftp Version: 3.1.2
Severity: normal Keywords: known_hosts, ssh key
Cc: Architecture:

Description (last modified by dkocher)

Whenever I start Cyberduck, and have an SFTP connection as the one to open by default, Cyberduck prompts about allowing the host key. This despite the fact that the host key is in the known_hosts file.

The console log contains a complaint:

ERROR ch.cyberduck.ui.cocoa.CDHostKeyController - Cannot read /Users/peter/.ssh/known_hosts

This is despite the fact that .ssh is world readable and executable and the known_hosts file is world readable.

Additionally, Cyberduck then adds an entry to known_hosts starting with |1| and keeps adding this every time 'always allow' is chosen at the prompt.

Change History (4)

comment:1 Changed on Apr 9, 2009 at 10:56:22 PM by PeterNSteinmetz

This is continuing to occur, even in the development build 4577.

Appears may be related to issue #2998.

Each time a site is accessed, a new line is being added to known_hosts, with an apparently bogus host name, like:

|1|uthAJVm7Mgh8MxSl3XR721aQa9U=|MdOZ6QfGMzX4XsiUeQHBAhmL9rI= ssh-rsa ... (key deleted) |1|VPOomxQVjSixfxlyjBK2WDJa6h4=|tliIwUSyIbPI4IJC2JFT8NJ0QAE= ssh-rsa ... (key deleted)

So I suppose it makes sense that this bogus host does not show up when there is a re-check.

comment:2 Changed on Apr 9, 2009 at 11:30:52 PM by PeterNSteinmetz


move the known_hosts file aside and start CyberDuck. Then copy contents of old back into new known_hosts.

More investigation.

The funny entries for hostname are hashed hostnames (per the source code) and seem to work ok (not sure why needed, and is certainly not then legible to people trying to modify their known_hosts). The file causing the trouble has finder attribute 32 set, but no attributes showed up with GetFileInfo. If one starts with no known_hosts at all and launches CyberDuck, it sets 32 and 104704 on the known_hosts file and has a custom icon.

comment:3 Changed on Nov 8, 2009 at 9:04:46 PM by dkocher

  • Description modified (diff)

comment:4 Changed on Nov 9, 2009 at 4:43:53 PM by dkocher

  • Resolution set to worksforme
  • Status changed from new to closed
  • Summary changed from known_hosts not read properly on startup/adding strange entries to known_hosts not read properly
Note: See TracTickets for help on using tickets.