Subject: Re: Character conversion for sftp

Re: Character conversion for sftp

From: NAGASEKHAR BHUVANAGIRI <bnagasekhar_at_gmail.com>
Date: Thu, 8 Apr 2010 15:07:01 +0530

Hi,
Thank you for the inputs.
The verbose mode execution of sftp connection using curl command line
utility is as follows:
$ curl -v sftp://user2:password2@10.176.XXX.XXX/
* About to connect() to 10.176.XXX.XXX port 22 (#0)
* Trying 10.176.XXX.XXX... connected
* Connected to 10.176.XXX.XXX (10.176.XXX.XXX) port 22 (#0)
* SFTP 0x39639930 state change from SSH_STOP to SSH_S_STARTUP
* Failure establishing ssh session
* SFTP 0x39639930 state change from SSH_S_STARTUP to SSH_SESSION_FREE
* SFTP 0x39639930 state change from SSH_SESSION_FREE to SSH_STOP
* SSH DISCONNECT starts now
* SFTP 0x39639930 state change from SSH_STOP to SSH_SFTP_SHUTDOWN
* SFTP 0x39639930 state change from SSH_SFTP_SHUTDOWN to
SSH_SESSION_DISCONNECT
* SFTP 0x39639930 state change from SSH_SESSION_DISCONNECT to
SSH_SESSION_FREE
* SFTP 0x39639930 state change from SSH_SESSION_FREE to SSH_STOP
* SSH DISCONNECT is done
* Closing connection #0
curl: (2) Failure establishing ssh session

We had same problem with libcurl porting to z-OS. But, we were able to
resolve the issue by defining the CURL_DOES_CONVERSION and HAVE_ICONV
macros, as done for TPF. But, it doesn't do the same for libssh2.
When I used same sftp server (freesshd) for testing from different
OS, banner_receive method in session.c receives "SSH-2.0-WeOnlyDo 2.1.3"
text, where as same text is garbled to
"..........|>%`.?........" when used in z-OS.

My question is, is there any way to convert the EBCDIC characters to ASCII
before sending the request to server (banner_send) and viceversa in
banner_receive for sftp?

Is there any method provided with licurl/libssh2 to handle conversion for
sftp, as libcurl has for ftp/ftps etc (by defining CURL_DOES_CONVERSION and
HAVE_ICONV).

Thanks,
Nagasekhar

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-04-08