Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

known_hosts not read properly #3013

Closed
cyberduck opened this issue Feb 22, 2009 · 2 comments
Closed

known_hosts not read properly #3013

cyberduck opened this issue Feb 22, 2009 · 2 comments
Assignees
Labels
bug sftp SFTP Protocol Implementation worksforme

Comments

@cyberduck
Copy link
Collaborator

2adf53f created the issue

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.

@cyberduck
Copy link
Collaborator Author

2adf53f commented

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.

@cyberduck
Copy link
Collaborator Author

2adf53f commented

A WORKAROUND:

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 com.apple.FinderInfo 32 and com.apple.ResourceFork 104704 on the known_hosts file and has a custom icon.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug sftp SFTP Protocol Implementation worksforme
Projects
None yet
Development

No branches or pull requests

2 participants