Modify

Ticket #157 (accepted defect)

Opened 16 months ago

Last modified 8 months ago

Unable to access directory: Unknown key format

Reported by: Jan K. Owned by: alamaison
Priority: minor (e.g. uncommon, cosmetic, has workaround) Milestone: 0.90 Beta 1
Component: authentication Version: 0.6.0
Keywords: Cc:

Description

Hi.

I added a connection to an Ubuntu 10.04 Machine. When double-clicking the connection I immediately get an error dialog saying "Unable to access directory". Details then show "Unknown key format"... whatever that means.

I have a cygwin Installation with SSH running on this machine... could this make a difference?

Attachments

swish.png Download (18.1 KB) - added by JK 16 months ago.
Error dialog
known_hosts.faulty Download (38.7 KB) - added by anonymous 8 months ago.
example file that causes the issue

Change History

Changed 16 months ago by JK

Error dialog

comment:1 Changed 16 months ago by anonymous

Addendum: The difference to Ticket #107 is that I do not even get a password dialog.

comment:2 in reply to: ↑ description Changed 16 months ago by alamaison

Replying to Jan K.:

I added a connection to an Ubuntu 10.04 Machine. When double-clicking the connection I immediately get an error dialog saying "Unable to access directory". Details then show "Unknown key format"... whatever that means.

At a guess, it is encountering a problem when exchanging the keys used to encrypt the channel - one of the first things that happens when opening an SSH connection. Can you tell us the type and version of SSH server running on the server you are trying to connect to?

I have a cygwin Installation with SSH running on this machine... could this make a difference?

Nothing is impossible but I very much doubt this has any effect on it. Swish uses libssh2 to communicate over SSH. It doesn't call any external SSH program so Cygwin shouldn't be able to get in the way.

comment:3 follow-up: ↓ 4 Changed 16 months ago by anonymous

Seeing the same thing going from Win7 to Suse Enterprise Desktop 10.

Never get a password prompt. Dialog says "Unable to access the directory" with details "Unknown key format". Connection between these boxes works fine with cygwin ssh client or putty ssh client. They do usually make me accept the host key on first connect.

I am using my cygwin home == C:\Users\me. Would they be using the same config files or directories?

comment:4 in reply to: ↑ 3 Changed 16 months ago by anonymous

p.s. both are 64 bit versions of the OS.

Replying to anonymous:

Seeing the same thing going from Win7 to Suse Enterprise Desktop 10.

comment:5 Changed 16 months ago by alamaison

So it turns out my earlier guess was wrong. What's happening here is that Swish (libssh2 really) doesn't like your locally recorded host key file.

In case you're not familiar with SSH, host keys are a security feature that help you realise when a malicious third-party is pretending to be the server you are connecting to. When a client connects to a server it looks at the server's 'host key' and looks up the value it was expecting to receive (the value it received last time) and warns you if they don't match. These keys are stored in a file called known_hosts in %HOME%\.ssh so on your system this file is probably found at C:\Users\me\.ssh\known_hosts.

In your case, libssh2 has not been able to parse this file. Either your file has become corrupted or it uses an unusual form that libssh2 doesn't support yet. In both cases, I'd be curious to see what is in this file so we can improve Swish's behaviour.

As a workaround, rename known_hosts to something else and try again.

comment:6 Changed 13 months ago by alamaison

  • Owner changed from jk to alamaison
  • Priority changed from critical (affects core workflow) to minor (e.g. uncommon, cosmetic)
  • Status changed from new to accepted
  • Milestone set to 0.90 Beta 1

Changed 8 months ago by anonymous

example file that causes the issue

comment:7 Changed 8 months ago by anonymous

If I'm not mistaken, OpenSSH changed the format of this file somewhere in the way, however it can ready both old and new-style lines in it.

I've been using the above file for the past few years, moving it between Linux and Windows (Cygwin) hosts.

Thank you for your work!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as accepted
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from alamaison. Next status will be 'assigned'
Next status will be 'closed'Mark duplicate
The owner will be changed from alamaison to anonymous. Next status will be 'accepted'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.