Message: previous - next
Month: April 2012

Re: [trinity-devel] ALMOST (not reading .ssh/config) [was Re: [trinity-devel] sftp-kio - still fails in R14 - Any progress? (log captured - may help?)]

From: "David C. Rankin" <drankinatty@...>
Date: Tue, 24 Apr 2012 08:36:40 -0500
On 04/24/2012 12:15 AM, Timothy Pearson wrote:
>> Yes, but 3.5.10 was working during the OpenSSH <=5.5p1 days. Perhaps
>> > something changed >5.5p1 that causes that snippet to now fail?
>> >
>> > Darrell
> The thing is, that snippet should never work in the first place.  Miracle
> engineering, even if it worked in 3.5.10, usually fails once assumed
> conditions change.
> Tim


  I did a test between the 'ssh -v' output of 'OpenSSH_5.0p1, OpenSSL 0.9.8g 19
Oct 2007' and 'OpenSSH_5.9p1, OpenSSL 1.0.1 14 Mar 2012'. Here are the key

===== OpenSSH_5.0p1 =====

08:10 nemesis:~> ssh -v -p 6662
OpenSSH_5.0p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /home/david/.ssh/config
debug1: Applying options for
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to [] port 6662.
debug1: Connection established.

===== OpenSSH_5.9p1 =====

21:02 archangel:/dat_e> ssh -v nirvana
OpenSSH_5.9p1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/david/.ssh/config
debug1: /home/david/.ssh/config line 26: Applying options for nirvana
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to nirvana [] port 6660.
debug1: Connection established.

  Looking, it seems the differences are lines '3' (5.9 provides path info to
local ssh config - 5.0 simply says 'Applying options...'). I don't think this is
it. Line '5' is totally MISSING in 5.9! If the current kio_sftp is relying on
line '6' for the IP and port information -- it will totally fail because that
information is now LINE '5'.

  This would explain why sftp got 'stuck' waiting on select() as Tim found!
Somewhere in the sftp code, it must be checking on the ssh output beginning with
line '6' looking for IP and port information:

debug1: Connecting to nirvana [] port 6660.

  however, with 5.9 it is getting:

debug1: Connection established.

  Causing the code to endlessly wait on select() to get the IP and port!! Now -
how to find where this takes place in the code to confirm?? It is probably a
hardcoded as some array index like 'sshOutputLine[5]' which will now need to be
changed to 'sshOutputLine[4]' to account for the deleted line in the output, or
just rewritten with a regex to look for "[] port 01234" in the

  How do we look for code like this to rule in or rule out this problem?

David C. Rankin, J.D.,P.E.