From libssh2-devel-bounces@cool.haxx.se  Tue Mar 24 15:30:39 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02OETvG1024296;
	Tue, 24 Mar 2020 15:30:27 +0100
Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com
 [IPv6:2607:f8b0:4864:20:0:0:0:102a])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02OETrFF023855
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Tue, 24 Mar 2020 15:29:54 +0100
Received: by mail-pj1-x102a.google.com with SMTP id l36so1558587pjb.3
 for <libssh2-devel@cool.haxx.se>; Tue, 24 Mar 2020 07:29:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=moontechnolabs.com; s=google;
 h=from:content-transfer-encoding:mime-version:subject:message-id:date
 :to; bh=4CjKMf+7uVCgTIRK8wzTF/UMFql/8V4ta1pqPaqCNcg=;
 b=yS9cTrsnCa7Sr7bNj58T/9Vnp3+NOr/VjUc35FjTJlhoDteDkiiAKytg9YNI3F2cEn
 6+3nwNxHvWDEakcRtAOGIerLYRCz/eBbOq8ut787U7dDdsEvqPimsFyab+lgi4vHKf8Q
 skoxx0FCocyDl9wHy2T25ZVQ7pKP8bEZPKw6U=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:message-id:date:to;
 bh=4CjKMf+7uVCgTIRK8wzTF/UMFql/8V4ta1pqPaqCNcg=;
 b=IjXnhlTL2wZTuW5tR1/jee6RLY5/sFohTl7AyPWd+QUi/npMoVlrDh1E4hbO/mG7Sg
 ws8zFGmQsOwztKQ8WIWRt8GsIMdIaLTdg58ofomsaTypZpWYaD9n6j0gen2+nQPQtXV+
 /X0mHdacgq8EnlJ0HVrR6MU2csrgqe9qO3rtGSLJs8wLnn9BC3tB4gfgAFvB04/iHlSJ
 O/sGQFG0oa740sINFh10Ut3tKgHtO2UZLUJ01+d4GYvt7K9Hp1XYoEQ/AFB9CAC9IxEU
 9O/XA0w/nuXdOoGu038+6mw+c0JpqasyJGJjt8hGC9Icscng+GxIzFVioFyfjBlS+rfy
 Wfow==
X-Gm-Message-State: ANhLgQ08GVPcnk8BeVtPCp1XU9gXEUQZaAimWhZONyW8uH/dngTK9TgO
 /QHQlDToYp9BX07JYznvTxEjYLCSKRHaJQ==
X-Google-Smtp-Source: ADFU+vsVzPA5j3gF11Fh6E04vE44g0vU1jxPRR89b7fLd05BTkvh4WeI+KKySR8XdKFTdxShOQKY+A==
X-Received: by 2002:a17:902:eb49:: with SMTP id
 i9mr26420117pli.91.1585060189621; 
 Tue, 24 Mar 2020 07:29:49 -0700 (PDT)
Received: from [192.168.1.119] ([122.170.1.34])
 by smtp.gmail.com with ESMTPSA id e6sm15294712pgu.44.2020.03.24.07.29.48
 for <libssh2-devel@cool.haxx.se>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 24 Mar 2020 07:29:48 -0700 (PDT)
From: Riddhi K <riddhi.k@moontechnolabs.com>
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\))
Subject: SSH Port Forwarding Disconnection Issue
Message-Id: <1C91958F-AF8F-4702-9295-91744CE0FAA6@moontechnolabs.com>
Date: Tue, 24 Mar 2020 19:59:45 +0530
To: libssh2-devel@cool.haxx.se
X-Mailer: Apple Mail (2.3601.0.10)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
 02OETrFF023855
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id 02OETvG1024296

Hello Team,

I am using libssh2 for my iOS SSH Client application. By the reference of direct_tcpip.c and tcpip_forward.c I’ve implemented Local and Remote Port Forwarding. The connection is working fine. But the issue is, after loading one request connection terminates automatically. For ex: If I have my Local Server A and Remote Server  B, Using Local Port Forwarding I am Forwarding server B’s port to My Local Server A. Connection established properly. After loading a single request in my local server, Remote server disconnects automatically and session terminates. Is there any solution or any suggestions regarding this issue?

Looking forward for the positive response.

Thank You,
Riddhi Kheni.
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Mar 26 11:26:16 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02QAPcH7000900;
	Thu, 26 Mar 2020 11:26:05 +0100
Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com
 [IPv6:2607:f8b0:4864:20:0:0:0:333])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02QAPYaI000704
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Thu, 26 Mar 2020 11:25:35 +0100
Received: by mail-ot1-x333.google.com with SMTP id 111so5213294oth.13
 for <libssh2-devel@cool.haxx.se>; Thu, 26 Mar 2020 03:25:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=wR+GaWqPktaeIo80Aq4wfOne1unKaPzwAIw7PfbwGS0=;
 b=vX4hq1pQpsUUelPTnVm0Ok5cMHJR6EhHGB9X3hgXtWff11ySfWZ37JZ9cv/U0Qh2mI
 rl1ViQQN5StqpdU7T72pqzp0nuixbhC78/Z0rcqEB88qVoKC5TDCRjqjl6Y4/QySccPb
 t0m/G72orX9wCYZY5E1J4xPKCDrI51MHLWHOLhE1H1qJPrfGEYSH4uB+qdQsPlUym8eu
 ud8T/fSLq2QftyzdY2FsYfa7kcUi7VPzNkm2Yj+CYyabnRF9T6oaHaIZs0Z74aQWLz6e
 OWuJLSyzw00M9wSQTL7x+eJGW7SaFtor8KzhH5l+2Y0meDBonN8b2MxOT70wuQ7lKGEk
 QzmA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=wR+GaWqPktaeIo80Aq4wfOne1unKaPzwAIw7PfbwGS0=;
 b=sVt+M3N2CXp5yA2afY2jLHvl6u5TlfWsRU9CQyMtdm6c+Vp99l8h5QNyEHCgdfLD38
 39NqjxO5ir0smvOwZj0AIVsn+saGsPgmPD4fWYaaneGGDO9bcJfUjnzYig9e1TJ2ptuE
 2z5PKiiGfBBJcNW3hvco6T1q/dIQiKDXgtAwehLxmRvP2a0725okj/iB4tw244rNHca2
 b9CJt4U7LYVTMB6By2ainwfZipBpu2CukX+EBCBEiFzZ7c/3hvuNVZNkK0F31LqPXgvP
 Wngi1RPJ7b48l/4E2Jm0OWiKd0kBNVogslF+nwQd2WJPqZs0SnnO1ec7YU1T1dpZcDI7
 Q2QA==
X-Gm-Message-State: ANhLgQ0DWtxh3Cv/6WFqal79wa6eyXzatoONufVT09i5I2l1ESC1c/Jf
 yoKu2rykGh2NRUfemP/3nvxynMD65tch/JirmjvD8YJd
X-Google-Smtp-Source: ADFU+vtknXp91e6XunqX/HYP3KKQTAOaZy27kbofzdkD4ikj/DfIqY3DKdQotK5GOQDJatfWxaIFO0p1Jg0Z8EXZ/G0=
X-Received: by 2002:a9d:469d:: with SMTP id z29mr5749317ote.320.1585218327830; 
 Thu, 26 Mar 2020 03:25:27 -0700 (PDT)
MIME-Version: 1.0
From: San <sganis@gmail.com>
Date: Thu, 26 Mar 2020 13:25:16 +0300
Message-ID: <CAPJOxpt3oGN6GtvUf-+Njf1RJHTV5k2t+V+rKPZyqvJqmwCxSQ@mail.gmail.com>
Subject: LibreSSL in windows
To: libssh2-devel@cool.haxx.se
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: multipart/mixed; boundary="===============1035021191=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>

--===============1035021191==
Content-Type: multipart/alternative; boundary="0000000000005266d405a1bf676f"

--0000000000005266d405a1bf676f
Content-Type: text/plain; charset="UTF-8"

Hello,
Is it possible to build libssh2 with libressl in windows?

San.

--0000000000005266d405a1bf676f
Content-Type: text/html; charset="UTF-8"

<div dir="ltr">Hello,<div>Is it possible to build libssh2 with libressl in windows?</div><div><br></div><div>San.</div></div>

--0000000000005266d405a1bf676f--

--===============1035021191==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGlic3NoMi1k
ZXZlbCBodHRwczovL2Nvb2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbGlic3No
Mi1kZXZlbAo=

--===============1035021191==--

From libssh2-devel-bounces@cool.haxx.se  Thu Mar 26 19:05:56 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02QI5MX6017852;
	Thu, 26 Mar 2020 19:05:48 +0100
Received: from mail.panic.com (mail.panic.com [38.103.165.36])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02QI5IGM017807
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Thu, 26 Mar 2020 19:05:19 +0100
Received: from macbook-retina.hsd1.or.comcast.net
 (c-24-22-78-147.hsd1.or.comcast.net [24.22.78.147])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.panic.com (Postfix) with ESMTPSA id 2785E2F9
 for <libssh2-devel@cool.haxx.se>; Thu, 26 Mar 2020 11:05:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=panic.com;
 s=default; t=1585245913;
 bh=OdxEtvWlEWeBd3mPJIzSz258nJWs1TvSqCwLqMJ+azQ=;
 h=From:Subject:Date:References:To:In-Reply-To;
 b=AUvDAOmApT25SCix2cDvv9fWijN0zdE9nWOXxenv5tiT9Ehs8fvRgNxE8ouRec3kA
 0qMeDO7DFOZ1BQ1BG41acMUJ2WP6LuaHcZ6/gxUKzzxUajxaLnkISyQFfpRdvKhwEu
 StLeSzLnmsealJsxQCRhfdUSzw0AQmm6Gh0W8vwY=
From: Will Cosgrove <will@panic.com>
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
Subject: Re: LibreSSL in windows
Date: Thu, 26 Mar 2020 11:05:12 -0700
References: <CAPJOxpt3oGN6GtvUf-+Njf1RJHTV5k2t+V+rKPZyqvJqmwCxSQ@mail.gmail.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
In-Reply-To: <CAPJOxpt3oGN6GtvUf-+Njf1RJHTV5k2t+V+rKPZyqvJqmwCxSQ@mail.gmail.com>
Message-Id: <36138E91-F764-49F4-8D6B-16B3A0690080@panic.com>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id 02QI5MX6017852

Yes, I believe this is possible. 

Cheers,
Will


> On Mar 26, 2020, at 3:25 AM, San <sganis@gmail.com> wrote:
> 
> Hello,
> Is it possible to build libssh2 with libressl in windows?
> 
> San.
> _______________________________________________
> libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Mar 26 22:14:35 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02QLE9Sp001394;
	Thu, 26 Mar 2020 22:14:28 +0100
Received: from foo.stuge.se (foo.stuge.se [212.116.89.98])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02QLE8ub001351
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Thu, 26 Mar 2020 22:14:08 +0100
Received: (qmail 3938 invoked by uid 1000); 26 Mar 2020 21:14:03 -0000
Message-ID: <20200326211403.3937.qmail@stuge.se>
Date: Thu, 26 Mar 2020 21:14:03 +0000
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: SSH Port Forwarding Disconnection Issue
References: <1C91958F-AF8F-4702-9295-91744CE0FAA6@moontechnolabs.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <1C91958F-AF8F-4702-9295-91744CE0FAA6@moontechnolabs.com>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id 02QLE9Sp001394

Hi,

Riddhi K wrote:
> I am using libssh2 for my iOS SSH Client application. By the reference of
> direct_tcpip.c and tcpip_forward.c I’ve implemented Local and Remote Port
> Forwarding. The connection is working fine. But the issue is, after loading
> one request connection terminates automatically.
..
> Is there any solution or any suggestions regarding this issue?

Those example programs intentionally demonstrate only the minimum that
is required to forward a single connection through SSH.

If you want to support multiple connections then you have to write
the code for that yourself, and to do so you will probably have to
spend a bit of time on studying that example code, so that you can
modify it to match your requirement.

The challenges involved in forwarding multiple connections are nearly
if not completely unrelated to the SSH forwarding itself, so they are
not really in scope for libssh2.

That said, if you can write a minimal example which processes multiple
forwarded connections, then please do propose it to be added as a
example in libssh2. Remember to keep the same style as existing code.


Thanks!

//Peter
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Mar 27 05:08:28 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02R47vGO031033;
	Fri, 27 Mar 2020 05:08:19 +0100
Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com
 [IPv6:2607:f8b0:4864:20:0:0:0:336])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02R47sUb030901
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 05:07:55 +0100
Received: by mail-ot1-x336.google.com with SMTP id l23so8441022otf.3
 for <libssh2-devel@cool.haxx.se>; Thu, 26 Mar 2020 21:07:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=ku1+iNH8KL285/2Ok7LLOQU0aekADNvmxAW93aWkny4=;
 b=KhfpZMGjt1/0ZMMcuzR4IGf6FYdhEFpsbxZjOlTlm3JTdHpxPyXXQCO00hkA5w0+/r
 mmfITcX1O3NXvR4zhaC/pLHy8ZjGPILPtTjSy3gDiYQpRH1ZD95XRMdbcgOgCU9T1uHp
 ypLcIRY7sIMDBYN2JxvfJm/UoO5IaYdSzQuC6Ozwo8xDhBAx0ML1JpE7l4wlWlLMaWg4
 84ye5XS5QLA9OvHspV2gNLeQxzaeAzH38beRE4RnNNwhYyoIyFqNH25FmtGK0SHojZmv
 u5s5YlTTV1czA49TBe2IcRV/aeKG/Whx3zlSr2WBiQIeM2jfdErZs+fBW8NnsIue7ZC1
 nycg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=ku1+iNH8KL285/2Ok7LLOQU0aekADNvmxAW93aWkny4=;
 b=g1QEi815JCMafeGOSO3pksmE20sAWV+VngUt1K5hVtFIdbbtXxfX7w8/P2Wb4fL1ME
 J1Ww9XVbcY0ZxSsq+sTZLWZhZ9IiWTSPsZWE20wxmIMS9A7w0F6GDAdkYeXgGWx0bWqV
 InI8j8wCIw+2Z2OEG6IEe2X2FbBC/c5QI1eOTFGSlS7K4eOkhnM/AHXjaiK4sddE0SLW
 a+VXH068zeM+OleXxK+lbfVJj0rAAEjhB8wfFIYiBNnHVhL5pBPFlvk34FCcO7cQfEgC
 Muf4GYuO9G77STQ239WHwGDkwrzEXK2Ej+wYID2adIUT93S9gaIXJfjWj2IG65mbbL4T
 aWHA==
X-Gm-Message-State: ANhLgQ1sboSORC0nesVcau030ASNLNx9kmCwBWnVakVedUT/lNJadoQP
 AZSm3+l7Y/DFlxxDBsPZzDjfcw1HAaSnb+g157pTmEfG
X-Google-Smtp-Source: ADFU+vt25ic45jgrfr3mE2EckjXcA4yD9vVQEWHsROLY0gX8DUQUaD5lWFSmMwmM5U0YnxQwqFn+UBOJM/yurug3uXw=
X-Received: by 2002:a9d:469d:: with SMTP id z29mr9054936ote.320.1585282068825; 
 Thu, 26 Mar 2020 21:07:48 -0700 (PDT)
MIME-Version: 1.0
References: <CAPJOxpt3oGN6GtvUf-+Njf1RJHTV5k2t+V+rKPZyqvJqmwCxSQ@mail.gmail.com>
 <36138E91-F764-49F4-8D6B-16B3A0690080@panic.com>
In-Reply-To: <36138E91-F764-49F4-8D6B-16B3A0690080@panic.com>
From: San <sganis@gmail.com>
Date: Fri, 27 Mar 2020 07:07:37 +0300
Message-ID: <CAPJOxpsnGgxas_LNqNO910A9Bs4-hOo0HCDMKVXn++0Qc_oCFw@mail.gmail.com>
Subject: Re: LibreSSL in windows
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: multipart/mixed; boundary="===============1400531145=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>

--===============1400531145==
Content-Type: multipart/alternative; boundary="00000000000094ca4705a1ce3e1f"

--00000000000094ca4705a1ce3e1f
Content-Type: text/plain; charset="UTF-8"

Is it documented somewhere?

On Thu, Mar 26, 2020 at 9:08 PM Will Cosgrove <will@panic.com> wrote:

> Yes, I believe this is possible.
>
> Cheers,
> Will
>
>
> > On Mar 26, 2020, at 3:25 AM, San <sganis@gmail.com> wrote:
> >
> > Hello,
> > Is it possible to build libssh2 with libressl in windows?
> >
> > San.
> > _______________________________________________
> > libssh2-devel
> https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>
> _______________________________________________
> libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>

--00000000000094ca4705a1ce3e1f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Is it documented somewhere?</div><br><div class=3D"gmail_q=
uote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Mar 26, 2020 at 9:08 PM=
 Will Cosgrove &lt;<a href=3D"mailto:will@panic.com">will@panic.com</a>&gt;=
 wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Yes, I b=
elieve this is possible. <br>
<br>
Cheers,<br>
Will<br>
<br>
<br>
&gt; On Mar 26, 2020, at 3:25 AM, San &lt;<a href=3D"mailto:sganis@gmail.co=
m" target=3D"_blank">sganis@gmail.com</a>&gt; wrote:<br>
&gt; <br>
&gt; Hello,<br>
&gt; Is it possible to build libssh2 with libressl in windows?<br>
&gt; <br>
&gt; San.<br>
&gt; _______________________________________________<br>
&gt; libssh2-devel <a href=3D"https://cool.haxx.se/cgi-bin/mailman/listinfo=
/libssh2-devel" rel=3D"noreferrer" target=3D"_blank">https://cool.haxx.se/c=
gi-bin/mailman/listinfo/libssh2-devel</a><br>
<br>
_______________________________________________<br>
libssh2-devel <a href=3D"https://cool.haxx.se/cgi-bin/mailman/listinfo/libs=
sh2-devel" rel=3D"noreferrer" target=3D"_blank">https://cool.haxx.se/cgi-bi=
n/mailman/listinfo/libssh2-devel</a><br>
</blockquote></div>

--00000000000094ca4705a1ce3e1f--

--===============1400531145==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGlic3NoMi1k
ZXZlbCBodHRwczovL2Nvb2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbGlic3No
Mi1kZXZlbAo=

--===============1400531145==--

From libssh2-devel-bounces@cool.haxx.se  Fri Mar 27 06:02:25 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02R528a5011942;
	Fri, 27 Mar 2020 06:02:21 +0100
Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com
 [IPv6:2607:f8b0:4864:20:0:0:0:d31])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02R526io011922
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 06:02:07 +0100
Received: by mail-io1-xd31.google.com with SMTP id y24so8557634ioa.8
 for <libssh2-devel@cool.haxx.se>; Thu, 26 Mar 2020 22:02:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=moontechnolabs.com; s=google;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=jYDIDi3mg6SC7x81ODwmW2Xpde7ylTA+Jnwr6fzbLwU=;
 b=iNNpGUWEuZcp/7fbK+MhwOE1SbrQOg8H3/BJFC/XUku3bWpsD+OPbFHEuR1tOcej7N
 8Is3GO2C42lQnJmda/3Xc5FJJgJilct3xNu+7mUcR1+QDF4Mtm6xdqWw6k50zbVTl+Uv
 cIL0Lkli+9Pw+Gu+VUnZMXBIFJFyZFiGV+4So=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=jYDIDi3mg6SC7x81ODwmW2Xpde7ylTA+Jnwr6fzbLwU=;
 b=MThhfJUsgf8MXJPY9q78uvy28liE8DszYEI6l+gA+sCugWXhA+6rSNKC50jBHeXX9a
 JuUXqDGSzuCEHHzs0YNWJ703XaokfoULA07zibsPAVsgzkY13pUCJvUHlnUl9U7vBQi+
 5nlcosED+fw2Vr9CLXFyKz26cBfT6/p70tcTLue6yGtLKSea+R6jBRFf26197NWnlT5q
 qCW13qxk7RVaY3LWIyYygBXGMnX5g8QYgbQLxsVlIwJErRJDT5xvlgGP7xaSoda/0kxL
 TxKPD5bs+yEaRy38oDWsRCQF/pJeBikWTQnuPLcuco+z3sYUidg9wVJyCPwNRWlsHN5M
 r4hg==
X-Gm-Message-State: ANhLgQ2Tiq42NkwrqhWnI30JcpBLT+5iZABjnUA3edAD6n5J01l8UObL
 G82vnwusm+hcFEeMsynWsqmErgcVOLbdr5Wxmg5Y5Deu81s=
X-Google-Smtp-Source: ADFU+vs0jQjFPjPB9cMNw3jMmjKs5Au2f5qhOVY1vdJE89lQKqYoFDgE7UbM9zHKDXAHf/TdyDltFwMHwH8RnZoI0bg=
X-Received: by 2002:a6b:b512:: with SMTP id e18mr325589iof.168.1585285321839; 
 Thu, 26 Mar 2020 22:02:01 -0700 (PDT)
MIME-Version: 1.0
References: <1C91958F-AF8F-4702-9295-91744CE0FAA6@moontechnolabs.com>
 <20200326211403.3937.qmail@stuge.se>
In-Reply-To: <20200326211403.3937.qmail@stuge.se>
From: Riddhi K <riddhi.k@moontechnolabs.com>
Date: Fri, 27 Mar 2020 10:31:50 +0530
Message-ID: <CACqRTd-QS7hbg8O4cu4g=4dsEPFHJ-dCw0gyVMpEpmGGo76=JQ@mail.gmail.com>
Subject: Re: SSH Port Forwarding Disconnection Issue
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: multipart/mixed; boundary="===============1273332203=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>

--===============1273332203==
Content-Type: multipart/alternative; boundary="0000000000007a3e9d05a1cf0071"

--0000000000007a3e9d05a1cf0071
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello,

Thank you Peter for your suggestions. It will be helpful for me.

Thank You,
Riddhi Kheni.

On Fri, Mar 27, 2020 at 2:48 AM Peter Stuge <peter@stuge.se> wrote:

> Hi,
>
> Riddhi K wrote:
> > I am using libssh2 for my iOS SSH Client application. By the reference =
of
> > direct_tcpip.c and tcpip_forward.c I=E2=80=99ve implemented Local and R=
emote Port
> > Forwarding. The connection is working fine. But the issue is, after
> loading
> > one request connection terminates automatically.
> ..
> > Is there any solution or any suggestions regarding this issue?
>
> Those example programs intentionally demonstrate only the minimum that
> is required to forward a single connection through SSH.
>
> If you want to support multiple connections then you have to write
> the code for that yourself, and to do so you will probably have to
> spend a bit of time on studying that example code, so that you can
> modify it to match your requirement.
>
> The challenges involved in forwarding multiple connections are nearly
> if not completely unrelated to the SSH forwarding itself, so they are
> not really in scope for libssh2.
>
> That said, if you can write a minimal example which processes multiple
> forwarded connections, then please do propose it to be added as a
> example in libssh2. Remember to keep the same style as existing code.
>
>
> Thanks!
>
> //Peter
> _______________________________________________
> libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>

--0000000000007a3e9d05a1cf0071
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello,</div><div><br></div><div>Thank you Peter for y=
our suggestions. It will be helpful for me.</div><div><br></div><div>Thank =
You,</div><div>Riddhi Kheni.<br></div></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Fri, Mar 27, 2020 at 2:48 AM Peter=
 Stuge &lt;<a href=3D"mailto:peter@stuge.se">peter@stuge.se</a>&gt; wrote:<=
br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e=
x;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Riddhi K wrote:<br>
&gt; I am using libssh2 for my iOS SSH Client application. By the reference=
 of<br>
&gt; direct_tcpip.c and tcpip_forward.c I=E2=80=99ve implemented Local and =
Remote Port<br>
&gt; Forwarding. The connection is working fine. But the issue is, after lo=
ading<br>
&gt; one request connection terminates automatically.<br>
..<br>
&gt; Is there any solution or any suggestions regarding this issue?<br>
<br>
Those example programs intentionally demonstrate only the minimum that<br>
is required to forward a single connection through SSH.<br>
<br>
If you want to support multiple connections then you have to write<br>
the code for that yourself, and to do so you will probably have to<br>
spend a bit of time on studying that example code, so that you can<br>
modify it to match your requirement.<br>
<br>
The challenges involved in forwarding multiple connections are nearly<br>
if not completely unrelated to the SSH forwarding itself, so they are<br>
not really in scope for libssh2.<br>
<br>
That said, if you can write a minimal example which processes multiple<br>
forwarded connections, then please do propose it to be added as a<br>
example in libssh2. Remember to keep the same style as existing code.<br>
<br>
<br>
Thanks!<br>
<br>
//Peter<br>
_______________________________________________<br>
libssh2-devel <a href=3D"https://cool.haxx.se/cgi-bin/mailman/listinfo/libs=
sh2-devel" rel=3D"noreferrer" target=3D"_blank">https://cool.haxx.se/cgi-bi=
n/mailman/listinfo/libssh2-devel</a><br>
</blockquote></div>

--0000000000007a3e9d05a1cf0071--

--===============1273332203==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGlic3NoMi1k
ZXZlbCBodHRwczovL2Nvb2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbGlic3No
Mi1kZXZlbAo=

--===============1273332203==--

From libssh2-devel-bounces@cool.haxx.se  Fri Mar 27 18:17:27 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02RHGhDT010492;
	Fri, 27 Mar 2020 18:17:11 +0100
Received: from qproxy2.mail.unifiedlayer.com
 (qproxy2-pub.mail.unifiedlayer.com [69.89.16.161])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02RHGeFG010297
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 18:16:41 +0100
Received: from cmgw14.unifiedlayer.com (unknown [10.9.0.14])
 by qproxy2.mail.unifiedlayer.com (Postfix) with ESMTP id E680435769
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 11:16:33 -0600 (MDT)
Received: from box310.bluehost.com ([69.89.31.110]) by cmsmtp with ESMTP
 id Hsavj5cuTKxvrHsavj7YQB; Fri, 27 Mar 2020 11:16:33 -0600
X-Authority-Reason: nr=8
X-Authority-Reason: s=1
X-Authority-Analysis: v=2.3 cv=Af2f4UfG c=1 sm=1 tr=0
 a=zmi7O4hW+YOq+d5ZB3oekg==:117 a=zmi7O4hW+YOq+d5ZB3oekg==:17
 a=5AYelqSM1ecA:10:uccc_punct_subject_2 a=SS2py6AdgQ4A:10:nop_rcvd_month_year
 a=-r5E72fWpcsA:10:endurance_base64_authed_username_1 a=J06fqRY9AAAA:8
 a=z_tcH7HGHmLOX_336J8A:9 a=QEXdDO2ut3YA:10:nop_charset_2
 a=sUQTEYKiURAA:10:phone_number_3 a=z-NuHhsTwEym-EXbhVoA:9
 a=FfaGCDsud1wA:10:nop_attachment_filename_extension_2
 a=M4uBx_gGXPXxY3ws9Bgf:22
Received: from 96-95-220-185-static.hfc.comcastbusiness.net
 ([96.95.220.185]:1741 helo=[10.250.7.12])
 by box310.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
 (Exim 4.92) (envelope-from <skip@taygeta.com>) id 1jHsav-001rHG-Fb
 for libssh2-devel@cool.haxx.se; Fri, 27 Mar 2020 11:16:33 -0600
Message-ID: <1585329391.1328.42.camel@taygeta.com>
Subject: using libssh2_userauth_publickey_frommemory()
From: Skip Carter <skip@taygeta.com>
To: libssh2-devel@cool.haxx.se
Date: Fri, 27 Mar 2020 10:16:31 -0700
X-Mailer: Evolution 3.22.6-1+deb9u2 
Mime-Version: 1.0
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - box310.bluehost.com
X-AntiAbuse: Original Domain - cool.haxx.se
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - taygeta.com
X-BWhitelist: no
X-Source-IP: 96.95.220.185
X-Source-L: No
X-Exim-ID: 1jHsav-001rHG-Fb
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: 96-95-220-185-static.hfc.comcastbusiness.net ([10.250.7.12])
 [96.95.220.185]:1741
X-Source-Auth: nobody
X-Email-Count: 0
X-Source-Cap: bm9ib2R5Oztib3gzMTAuYmx1ZWhvc3QuY29t
X-Local-Domain: no
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: multipart/mixed; boundary="===============1159430178=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>


--===============1159430178==
Content-Type: multipart/signed; micalg="pgp-sha256";
	protocol="application/pgp-signature"; boundary="=-sijy78y3pSaDOwP3Dx31"


--=-sijy78y3pSaDOwP3Dx31
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello,

I have written an application using 1.9.0

I authenticate using libssh2_userauth_publickey_fromfile()  and it
works just fine. But when I switch to
libssh2_userauth_publickey_frommemory()
it fails.

I am guessing that the keydata is wrong.  Reading the documentation I
find it vague.  Is the keydata the string you would get from just
loading key as a string ?  just the base-64 data ?  the data that you
would get from base-64 decoding the string to binary ?  I have tried
all three interpretations of what "keydata" could mean.  It still
fails.

Any insights ?

--=20
Dr Everett (Skip) Carter=C2=A0=C2=A00xF29BF36844FB7922
skip@taygeta.com

Taygeta Scientific Inc
607 Charles Ave
Seaside CA 93955
831-641-0645 x103


--=-sijy78y3pSaDOwP3Dx31
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEE3xZ4GmBKT2BfmLMB8pvzaET7eSIFAl5+NO8ACgkQ8pvzaET7
eSJSbwv/Z51DGi2138+Fq99uhSLTvMAmGyIh/m5wYBDYVbi4/kT0rKrqBHcieeqh
3lszZpcuOb+BYQOgrC6faieXBjCLvFXFJvjK94MuhIMDkM1TrigTpKQPkD/J/TNw
mALe2adzNkJBi61+tR56IQOIho7wKLf9INx2ML4eZhmpyW2+IMMxnT0cHP3Ngjgi
Qwb8O8PcCLcW1x/qz8mGib5DrjWeaZZdtg5b8hUrlX6h3w9TEpJwo+RdSAa2BV5s
x+kSv1YG2NMVSuIvGuzGXu9qtlm+e8chs3H9gVwfDwClz7qhPKJJ1mX2o0HUVJUl
fx0XwLYemv8HDCX3q9V2a1fZVjSqiDH/ELNvimC3lLKPEHjCTqW5eEyafojFFX58
mogLi6LhIRbqvUi5F6q4ODjgZhO/f5+JjOgKwclqV4mwo4dmcOG32jA13idu4JcO
xt59bP/5ts95mWsW9TJ+9rjjVXHTfipPB0ILlEg1zvcX7YtiiVwxYh8gTwU5RsPG
WJbmH6Sf
=a0Aa
-----END PGP SIGNATURE-----

--=-sijy78y3pSaDOwP3Dx31--


--===============1159430178==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGlic3NoMi1k
ZXZlbCBodHRwczovL2Nvb2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbGlic3No
Mi1kZXZlbAo=

--===============1159430178==--

From libssh2-devel-bounces@cool.haxx.se  Fri Mar 27 21:38:23 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02RKbtg0028870;
	Fri, 27 Mar 2020 21:38:15 +0100
Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com
 [IPv6:2607:f8b0:4864:20:0:0:0:32a])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02RKbqcG028736
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 21:37:53 +0100
Received: by mail-ot1-x32a.google.com with SMTP id j16so11224559otl.1
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 13:37:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=XFS/7+A3zjcIhxgf/Kc8OR/5Zw4S6jFQr/odfTNr/d0=;
 b=tozgy/ReQS/FEIJd8RLEkTwYK8EVbe1s0taF+IE9ZeL1xdH4FCWao23GcBowldF1nZ
 1MMH2YoZ+hlJrMZLIBA8gms367iloDEsXtWr9HldiscMHNhPJ2o0bE3srWAV70+FjSQV
 FDYMbxT0VV7NGBApbL7oB+QTuZqnCqkTBW3yHTh40JbMe98xND4m7GcOilf9g+nWCh//
 EkbRU5awdzujAAUG9EGFF0QCrKQqwVoA+4DQ2UVXXKS0a8pjIy52IDVNDv8fmd8OtvAD
 1A67dAP+Y3JPZWHnsD0Rvqly2OaPhBjI1lD7Y7ISAGWIp7JBEAsAd/2JrpTTcbvjB+RA
 Uhhw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=XFS/7+A3zjcIhxgf/Kc8OR/5Zw4S6jFQr/odfTNr/d0=;
 b=s23FfLwsrGul929/hmuUCI1pMNlp/b9B27wmE6w54AqriKfmSYRbHIl4Mxw2WSs30V
 gQvPsiA3aMC9hHQ0aTKFi2vgIAZLzV6r+DQm899q34JNxyT++UXkPcGjegBhs9nQ5Uff
 X6M++Wl1LxZ44jyRhs6fqzX+FDaYuiTkMKfMn56CeppqA2AQNOWZBz/C991OpdGXdKNB
 Y2pnzTcdlLN5njzgwjun6JLrkJLSmDP+YDEsVlImjke7Jh4WNaUH4eXpaiBfKSEbjU/w
 /qY7cVyNXJRVRRR+MbOjV4zCQO4YGZibkXJCRzJnpOeNIdKMF2+JR48nkPaJsWQPqSTn
 Et4g==
X-Gm-Message-State: ANhLgQ2w1sjjjQEaX8hUEMnjlArUDNlT6DjdzcrC5vIgTCnqtEQ343Ow
 CJckei/gSENR4DcwYAZqJp2SYKQ6cq9P1uJWFvu5f4Q80Js=
X-Google-Smtp-Source: ADFU+vuSdzyFjQkj82TklA9que5BEXMWfiLaTiNQZHJ6tvCWz9e4GQM/0Q4ygTcNiMbOboGmZf47sN6/ORNBQM4Elrg=
X-Received: by 2002:a05:6830:c5:: with SMTP id x5mr417170oto.302.1585341467742; 
 Fri, 27 Mar 2020 13:37:47 -0700 (PDT)
MIME-Version: 1.0
From: San <sganis@gmail.com>
Date: Fri, 27 Mar 2020 23:37:36 +0300
Message-ID: <CAPJOxps8bez71BEFgvJGpTAkREQnTTQVfB6OkV=1fMeozsdWFQ@mail.gmail.com>
Subject: write returns zero
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: multipart/mixed; boundary="===============0281590436=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>

--===============0281590436==
Content-Type: multipart/alternative; boundary="0000000000000a0a1305a1dc13fd"

--0000000000000a0a1305a1dc13fd
Content-Type: text/plain; charset="UTF-8"

Hello All,

What are the possible reasons of *libssh2_sftp_write* returning zero ?
My implementation follows this example. I have to check for rc<=0 or there
is an endless loop because the write function returns 0 all the time.
What's happening?

        *do* {
            */* write data in a loop until we block */ *
            *while*((rc = libssh2_sftp_write
<https://www.libssh2.org//libssh2_sftp_write.html>(sftp_handle, ptr,
nread)) ==

                   LIBSSH2_ERROR_EAGAIN) {
                waitsocket(sock, session);
            }
            *if*(rc < 0)
                *break*;
            ptr += rc;
            nread -= rc;

        } *while*(nread);


// San.

--0000000000000a0a1305a1dc13fd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello All,<div><br></div><div>What are the possible reason=
s of <b>libssh2_sftp_write</b> returning zero ?</div><div>My implementation=
=C2=A0follows this example. I have to check for rc&lt;=3D0 or there is an e=
ndless loop because the write function returns 0 all the time.</div><div>Wh=
at&#39;s happening?</div><div><br></div><div><pre style=3D"color:rgb(0,0,0)=
">        <b><font color=3D"#A020F0">do</font></b> {
            <i><font color=3D"#B22222">/* write data in a loop until we blo=
ck */ </font></i>
            <b><font color=3D"#A020F0">while</font></b>((rc =3D <a href=3D"=
https://www.libssh2.org//libssh2_sftp_write.html">libssh2_sftp_write</a>(sf=
tp_handle, ptr, nread)) =3D=3D

                   LIBSSH2_ERROR_EAGAIN) {
                waitsocket(sock, session);
            }
            <b><font color=3D"#A020F0">if</font></b>(rc &lt; 0)
                <b><font color=3D"#A020F0">break</font></b>;
            ptr +=3D rc;
            nread -=3D rc;
=C2=A0
        } <b><font color=3D"#A020F0">while</font></b>(nread);</pre><pre sty=
le=3D"color:rgb(0,0,0)"><br></pre><pre style=3D"color:rgb(0,0,0)">// San.</=
pre></div></div>

--0000000000000a0a1305a1dc13fd--

--===============0281590436==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGlic3NoMi1k
ZXZlbCBodHRwczovL2Nvb2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbGlic3No
Mi1kZXZlbAo=

--===============0281590436==--

From libssh2-devel-bounces@cool.haxx.se  Fri Mar 27 22:28:37 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02RLSLOp011325;
	Fri, 27 Mar 2020 22:28:33 +0100
Received: from mail.panic.com (mail.panic.com [38.103.165.36])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02RLSIkO011170
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 22:28:19 +0100
Received: from [10.0.13.10] (router0.pittock.panic.com [10.0.4.1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.panic.com (Postfix) with ESMTPSA id 8D848989
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 14:28:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=panic.com;
 s=default; t=1585344493;
 bh=y08gT8ORTB7n2EhxhsVPMuJZMO6W0dv2JQTV1zBsALg=;
 h=From:Subject:Date:References:To:In-Reply-To;
 b=OAL7JErbgDF+dYccwaOIwMvjmlzJxy4Ud3pz7G7Qq2MIsCxEbwI89X/qIMR6eAC+l
 RATl9jmeQZBDaRg/e8pi7GYDaSsj7nMXU5yB09d4OOQBiEY9cFncHHoGDLd5OFEpcH
 3sY/9c+VB+SWPJ0igG34EJl4wBQs3eZ1Cw1X4iaU=
From: Will Cosgrove <will@panic.com>
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
Subject: Re: using libssh2_userauth_publickey_frommemory()
Date: Fri, 27 Mar 2020 14:28:12 -0700
References: <1585329391.1328.42.camel@taygeta.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
In-Reply-To: <1585329391.1328.42.camel@taygeta.com>
Message-Id: <0D470CED-6728-4968-92F3-74E0D49939CD@panic.com>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
 02RLSIkO011170
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id 02RLSLOp011325

The frommemory() function takes a buffer that is the contents of the key file including header, etc with no decoding. It only works with the OpenSSL backend at the moment, IIRC.

Cheers,
Will

> I authenticate using libssh2_userauth_publickey_fromfile()  and it
> works just fine. But when I switch to
> libssh2_userauth_publickey_frommemory()
> it fails.
> 
> I am guessing that the keydata is wrong.  Reading the documentation I
> find it vague.  Is the keydata the string you would get from just
> loading key as a string ?  just the base-64 data ?  the data that you
> would get from base-64 decoding the string to binary ?  I have tried
> all three interpretations of what "keydata" could mean.  It still
> fails.
> 
> Any insights ?
> 
> -- 
> Dr Everett (Skip) Carter  0xF29BF36844FB7922
> skip@taygeta.com
> 
> Taygeta Scientific Inc
> 607 Charles Ave
> Seaside CA 93955
> 831-641-0645 x103
> 
> _______________________________________________
> libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Sat Mar 28 01:22:56 2020
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (mail [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id 02S0MSUA029163;
	Sat, 28 Mar 2020 01:22:47 +0100
Received: from qproxy2.mail.unifiedlayer.com
 (qproxy2-pub.mail.unifiedlayer.com [69.89.16.161])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id 02S0MOvd028885
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Sat, 28 Mar 2020 01:22:26 +0100
Received: from cmgw10.unifiedlayer.com (unknown [10.9.0.10])
 by qproxy2.mail.unifiedlayer.com (Postfix) with ESMTP id DA56935765
 for <libssh2-devel@cool.haxx.se>; Fri, 27 Mar 2020 18:21:25 -0600 (MDT)
Received: from box310.bluehost.com ([69.89.31.110]) by cmsmtp with ESMTP
 id HzE5ju91FxgMWHzE5jhlo4; Fri, 27 Mar 2020 18:21:25 -0600
X-Authority-Reason: nr=8
X-Authority-Reason: s=1
X-Authority-Analysis: v=2.3 cv=V8FTL9vi c=1 sm=1 tr=0
 a=zmi7O4hW+YOq+d5ZB3oekg==:117 a=zmi7O4hW+YOq+d5ZB3oekg==:17
 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=SS2py6AdgQ4A:10:nop_rcvd_month_year
 a=-r5E72fWpcsA:10:endurance_base64_authed_username_1 a=J06fqRY9AAAA:8
 a=L3m5MptX3o0SOKsyrG4A:9 a=QEXdDO2ut3YA:10:nop_charset_2
 a=sUQTEYKiURAA:10:phone_number_3 a=rNh89PWUwCq3SSvrfB8A:9
 a=FfaGCDsud1wA:10:nop_attachment_filename_extension_2
 a=M4uBx_gGXPXxY3ws9Bgf:22
Received: from 96-95-220-185-static.hfc.comcastbusiness.net
 ([96.95.220.185]:1060 helo=[10.250.7.12])
 by box310.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
 (Exim 4.92) (envelope-from <skip@taygeta.com>) id 1jHzE5-0038b2-Go
 for libssh2-devel@cool.haxx.se; Fri, 27 Mar 2020 18:21:25 -0600
Message-ID: <1585354883.1328.45.camel@taygeta.com>
Subject: Re: using libssh2_userauth_publickey_frommemory()
From: Skip Carter <skip@taygeta.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Date: Fri, 27 Mar 2020 17:21:23 -0700
In-Reply-To: <0D470CED-6728-4968-92F3-74E0D49939CD@panic.com>
References: <1585329391.1328.42.camel@taygeta.com>
 <0D470CED-6728-4968-92F3-74E0D49939CD@panic.com>
X-Mailer: Evolution 3.22.6-1+deb9u2 
Mime-Version: 1.0
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - box310.bluehost.com
X-AntiAbuse: Original Domain - cool.haxx.se
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - taygeta.com
X-BWhitelist: no
X-Source-IP: 96.95.220.185
X-Source-L: No
X-Exim-ID: 1jHzE5-0038b2-Go
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: 96-95-220-185-static.hfc.comcastbusiness.net ([10.250.7.12])
 [96.95.220.185]:1060
X-Source-Auth: nobody
X-Email-Count: 0
X-Source-Cap: bm9ib2R5Oztib3gzMTAuYmx1ZWhvc3QuY29t
X-Local-Domain: no
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel/>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: multipart/mixed; boundary="===============0155487784=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>


--===============0155487784==
Content-Type: multipart/signed; micalg="pgp-sha256";
	protocol="application/pgp-signature"; boundary="=-4pt9oDnJ15KwUA6bdl8/"


--=-4pt9oDnJ15KwUA6bdl8/
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Will,

I found the problem:  be careful with leading/trailing whitespace with
the keys.  I augmented my application to first remove leading and
trailing whitespaces from the key data and it now works as expected.

Knowing from your tip that the key is just a copy if keyfile without
decoding saved me from lots of unnecessary testing.

Thanks,

On Fri, 2020-03-27 at 14:28 -0700, Will Cosgrove wrote:
> The frommemory() function takes a buffer that is the contents of the
> key file including header, etc with no decoding. It only works with
> the OpenSSL backend at the moment, IIRC.



--=20
Dr Everett (Skip) Carter=C2=A0=C2=A00xF29BF36844FB7922
skip@taygeta.com

Taygeta Scientific Inc
607 Charles Ave
Seaside CA 93955
831-641-0645 x103



--=-4pt9oDnJ15KwUA6bdl8/
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iQGzBAABCAAdFiEE3xZ4GmBKT2BfmLMB8pvzaET7eSIFAl5+mIMACgkQ8pvzaET7
eSLQbgv8DQHIKzp6RUnY4JzaE8sRGMeY/i8N4+ODR6J4XXr3Cps7wVKnZ8/nLb1N
c4/6PP+5N1CGeSCKVbGB5Qe10b1Pbz1DxUFuaLeq3P4hh3oIc6Df5+0xiIM9nUtn
6VanX0K5vjKYyRfO6Vu9hJ4HXAakU1EIZJCV5PcOJJrS54u1JlQXwZdSPnOAsArN
FXNdVnQHboFHfrth8yXjmMGeFgGxBik8DePoNW4QGGkKA5DwuK7VrkHglT4XEofo
0iHQanihxAVfFtScSkLl35ZkS7Eyoj/0J3QyhFmzieoT1lySbwT4g0Q0kUwtTtaD
OwvYkqIUnR/O5ZWqAf+Tv3aIuDHmjxJd0OyT/vdGggPqQgbv0VvozelhgB/z7+Si
ddDRtdCBjhwhsw7AOh8xmkeUrUaZKYrwE3/auVBsZHW37WTEJ8B7HVlGU4w82e0b
jx7zG9MnRhkLG9caQEFq+O9+PFEzXhnrhG/bx61X6r5zWAXquSu2XqpbqewYVVV+
g+eFyLMw
=feV1
-----END PGP SIGNATURE-----

--=-4pt9oDnJ15KwUA6bdl8/--


--===============0155487784==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGlic3NoMi1k
ZXZlbCBodHRwczovL2Nvb2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbGlic3No
Mi1kZXZlbAo=

--===============0155487784==--

