Cyberduck Mountain Duck CLI

#8166 closed defect (fixed)

Interoperability with SSH Tectia Server

Reported by: tomihasa Owned by: I am owner
Priority: high Milestone: 4.6
Component: sftp Version: 4.5.1
Severity: critical Keywords: listing, directory, failed
Cc: Architecture: Intel
Platform:

Description (last modified by dkocher)

Handle not found listing directory failure

I can no longer log in using SFTP as I have before to the same server. I get text:

Handle not found, file: ???

1 REALPATH
2 OPENDIR
3 READDIR

http://imagizer.imageshack.us/v2/150x100q90/540/GId4Me.png

Change History (21)

comment:1 follow-up: Changed on Aug 11, 2014 at 4:37:07 PM by dkocher

  • Resolution set to worksforme
  • Status changed from new to closed

Please check the default path set in the bookmark.

comment:2 Changed on Aug 11, 2014 at 4:41:04 PM by tomihasa

My default directory is empty. What should it be?

comment:3 Changed on Aug 11, 2014 at 8:12:11 PM by dkocher

  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Summary changed from Listing directory failed to Handle not found listing directory failure

comment:4 in reply to: ↑ 1 Changed on Aug 12, 2014 at 5:36:46 AM by tomihasa

Replying to dkocher:

Please check the default path set in the bookmark.

I made a YouTube video about the problem:

http://www.youtube.com/watch?v=zMhyFmbWn-I

comment:5 follow-up: Changed on Aug 12, 2014 at 2:02:04 PM by dkocher

Do you know the SSH server product used?

comment:6 in reply to: ↑ 5 Changed on Aug 12, 2014 at 2:08:26 PM by dkocher

Replying to dkocher:

Do you know the SSH server product used?

I suspect this is an interoperability issue with Tectia SSH Server.

comment:7 follow-ups: Changed on Aug 12, 2014 at 2:19:04 PM by tomihasa

My school uses Tectia on class computers:

http://www.google.com/search?num=50&newwindow=1&q=Tectia+site%3Auta.fi&oq=Tectia+site%3Auta.fi

But I have been able to use people.uta.fi with Cyberduck on my Mac so far.

And SSH is not allowed on people.uta.fi, because that server is for student home pages only, not for anything else.

comment:8 Changed on Aug 12, 2014 at 2:22:36 PM by dkocher

  • Description modified (diff)
  • Summary changed from Handle not found listing directory failure to Interoperability with SSH Tectia Server

comment:9 in reply to: ↑ 7 Changed on Aug 12, 2014 at 2:22:59 PM by dkocher

Replying to tomihasa:

And SSH is not allowed on people.uta.fi, because that server is for student home pages only, not for anything else.

The server identifies itself as

debug1: Remote protocol version 2.0, remote software version 6.4.5.90 SSH Tectia Server
Last edited on Aug 12, 2014 at 2:23:14 PM by dkocher (previous) (diff)

comment:10 in reply to: ↑ 7 Changed on Aug 12, 2014 at 2:23:58 PM by dkocher

Replying to tomihasa:

But I have been able to use people.uta.fi with Cyberduck on my Mac so far.

The issue is new as we replaced our SSH implementation in version 4.5.

comment:11 Changed on Aug 12, 2014 at 2:52:51 PM by tomihasa

This additional info may or may not help. At least earlier this year we have been able to use for example WinSCP (free software, Windows), but I prefer Mac over Windows, so I haven't much used WinSCP:

http://www.google.com/search?hl=en&as_q=WinSCP&as_qdr=y&as_sitesearch=uta.fi&as_occt=any

o o o

This info might be totally unrelated. With some services with some servers my school is starting to use Microsoft Office 365 this year:

http://www.uta.fi/hallinto/yliopistopalvelut/tietohallinto/office365/index.html

comment:12 Changed on Aug 14, 2014 at 8:02:52 PM by dkocher

  • Resolution set to thirdparty
  • Status changed from reopened to closed

Handed over to Tectia support as Case TECT32879.

comment:13 Changed on Sep 8, 2014 at 12:48:26 PM by bact

  • Platform Mac OS X 10.9 deleted
  • Resolution thirdparty deleted
  • Status changed from closed to reopened

I would like this ticket to be reopened, as it seems to me a CyberDuck issue.

Apparently it seems that the Tectia SSH server creates a handle for the OpenDIR operation and gives it to the CyberDuck client. When doing ReadDir, Cyberduck client sends back that handle modified to the Tectia SSH server, so the Tectia SSH server is not able to fulfill the operation.

The SSH File Transfer Protocol clearly states: http://tools.ietf.org/html/draft-ietf-secsh-filexfer-01

"The SSH_FXP_HANDLE response has the following format:

uint32 id
string handle

where id' is the request identifier, and handle' is an arbitrary string that identifies an open file or directory on the server. The handle is opaque to the client; the client MUST NOT attempt to interpret or modify it in any way. The length of the handle string MUST NOT exceed 256 data bytes."

Checking at the SSHJ code (sshj-0.8.1.zip) it seems that the code assumes the incoming string is UTF-8, and the code does some conversions that will fail if applied against a binary string. Tectia SSH Server sends binary strings, so, Cyberduck does some conversion resulting in a modified handle when requesting for ReadDir…

I have taken the liberty to modify the SSHJ code a bit, just by changing the type of the “handle” as “byte[]” and using readBytes/writeBytes function and it seems to correct the problem.

I am not sure, though, what version of sshj CyberDuck is using, but I have seen a similar behavior.

To my eyes, Tectia SSH Server works as specified, and Cyberduck is violating clearly the protocol. Please, correct me if I am wrong.

comment:14 Changed on Sep 8, 2014 at 1:39:42 PM by dkocher

  • Milestone set to 4.5.3

comment:16 Changed on Sep 10, 2014 at 9:32:30 AM by dkocher

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

In r15093.

comment:17 follow-up: Changed on Sep 10, 2014 at 2:17:49 PM by tomihasa

I updated Cyberduck today (v4.5.2). I still get the same error message as I have shown on my YouTube video mentioned in this topic. But I'm sure you will get it fixed!

comment:18 in reply to: ↑ 17 Changed on Sep 10, 2014 at 2:26:16 PM by dkocher

Replying to tomihasa:

I updated Cyberduck today (v4.5.2). I still get the same error message as I have shown on my YouTube video mentioned in this topic. But I'm sure you will get it fixed!

Please update to the latest 4.5.3 snapshot build available.

comment:19 follow-up: Changed on Sep 11, 2014 at 9:03:32 AM by tomihasa

There is no version 4.5.3 available, at least for me. I guess Apple has not yet approved it.

comment:20 in reply to: ↑ 19 Changed on Sep 11, 2014 at 9:11:51 AM by dkocher

Replying to tomihasa:

There is no version 4.5.3 available, at least for me. I guess Apple has not yet approved it.

This is a snapshot build not released yet. Please download from https://update.cyberduck.io/nightly/.

comment:21 Changed on Mar 9, 2015 at 7:59:44 PM by tomihasa

The version 4.6.5 seems to have finally fixed my issue. It has been over 6 months since I have been able to log in to my school account.

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