Peter Stuge | 1 Apr 2010 01:28
Picon

Re: Issues with using LibSSH2

Kalyan Polasi wrote:
> Could you please suggest me the current working version

Try this: http://josefsson.org/gnutls4win/libssh2-1.2.4.zip
Also see the page http://josefsson.org/gnutls4win/ under
"Using the GnuTLS DLL from your Visual Studio program"
for more information about how you can use those binaries in your own
programs.

> for port-forwarding?

The direct_tcpip.c example demonstrates how to do it. You can
hopefully download that file and compile it, using Simon's
instructions on the page linked above.

> or can you help me with the simple example to connect to other
> machine using Libssh2? 

Included in every release you can find multiple very simple examples
that will show how you can use libssh2 to connect to a remote host.

As an alternative to using the pre-built gnutls4win binaries, you
could also download the libssh2-1.2.4 release and try to build the
library binaries yourself, along with all the examples. That is more
difficult, but does have the examples.

> I was also not able to make use of libssh2_session_init(). Can you
> please tell me why I does I am getting that linker error?

If you are getting a linker error then your linker can not find some
(Continue reading)

libssh2 Trac | 1 Apr 2010 13:13
Picon
Favicon

Re: #167: Unable to init SFTP session vs SSH-2.0-SSHD

#167: Unable to init SFTP session vs SSH-2.0-SSHD
--------------------+-------------------------------------------------------
 Reporter:  ptjm    |       Owner:  bagder  
     Type:  defect  |      Status:  assigned
 Priority:  normal  |   Milestone:          
Component:  SFTP    |     Version:  1.2.5   
 Keywords:          |    Blocking:          
Blockedby:          |  
--------------------+-------------------------------------------------------

Comment(by bagder):

 LIBSSH2_ERROR_EAGAIN is -37, on all systems. Don't confuse that with the
 errno value EAGAIN.

 Right, so there was no more window left to send data to so it stopped and
 returned a value less than 9, right?

 That only makes my comment about us having to fix sftp_init() more
 important. Doesn't it?

--

-- 
Ticket URL: <http://libssh2.stuge.se/ticket/167#comment:3>
libssh2 <http://libssh2.stuge.se/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

libssh2 Trac | 1 Apr 2010 20:24
Picon
Favicon

Re: #167: Unable to init SFTP session vs SSH-2.0-SSHD

#167: Unable to init SFTP session vs SSH-2.0-SSHD
--------------------+-------------------------------------------------------
 Reporter:  ptjm    |       Owner:  bagder  
     Type:  defect  |      Status:  assigned
 Priority:  normal  |   Milestone:          
Component:  SFTP    |     Version:  1.2.5   
 Keywords:          |    Blocking:          
Blockedby:          |  
--------------------+-------------------------------------------------------

Comment(by ptjm):

 Thanks. I applied that patch to SSH-2.0-libssh2_1.2.5-20100401 and it
 appears to have fixed the problem. At least, sftpdir works correctly vs
 this server.

--

-- 
Ticket URL: <http://libssh2.stuge.se/ticket/167#comment:4>
libssh2 <http://libssh2.stuge.se/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

libssh2 Trac | 1 Apr 2010 20:27
Picon
Favicon

Re: #167: Unable to init SFTP session vs SSH-2.0-SSHD

#167: Unable to init SFTP session vs SSH-2.0-SSHD
---------------------+------------------------------------------------------
  Reporter:  ptjm    |       Owner:  bagder
      Type:  defect  |      Status:  closed
  Priority:  normal  |   Milestone:  1.2.5 
 Component:  SFTP    |     Version:  1.2.5 
Resolution:  fixed   |    Keywords:        
  Blocking:          |   Blockedby:        
---------------------+------------------------------------------------------
Changes (by bagder):

  * status:  assigned => closed
  * resolution:  => fixed
  * milestone:  => 1.2.5

Comment:

 Great! This fix is now pushed to the git repo and I'm closing this report.
 Thanks for your help!

--

-- 
Ticket URL: <http://libssh2.stuge.se/ticket/167#comment:5>
libssh2 <http://libssh2.stuge.se/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Jose Baars | 3 Apr 2010 01:01
Favicon

small patch to userauth.c

Hi,

I got several compiler warnings when compiling userauth.c
caused by missing or incorrect casts.

I have added a patch that solves these.

Regards,
Jose



_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Daniel Stenberg | 4 Apr 2010 23:34
Picon
Favicon
Gravatar

Re: small patch to userauth.c

On Fri, 2 Apr 2010, Jose Baars wrote:

> I got several compiler warnings when compiling userauth.c caused by missing 
> or incorrect casts.
>
> I have added a patch that solves these.

Thanks, but the iov_base field within the struct iovec is said to be a 'void 
*' in POSIX and in my linux headers, so why not typecast to that?

--

-- 

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

Lillian Poon | 5 Apr 2010 20:25
Picon
Favicon

Issues on using libssh2_channel_direct_tcpip

Hi Team,

I have been using libssh2 v1.2 to implement a custom SSH client on MacOS 10.6.x and it works well.  Recently I
started to add SSH tunneling function by using libssh2_channel_direct_tcpip but saw frequent
disconnection, and still got no luck after switching to v1.2.4.  I then tested using the direct_tcpip
sample code and observed similar situation.

Basically, my test is establishing a tunnel between local port 9188 and port 9288 on the remote host which
has an Apache proxy server listening to port 9288 -- by running the sample program "direct_tcpip x.x.x.x
<id> <passwd> 127.0.0.1 9188 localhost 9288". Then I configure proxy setting on Firefox to use http proxy
on localhost port 9188, expecting it to exchange data with the remote proxy server.  It is seen that
connection usually breaks after fetching a few pages and the error message "The server at localhost:9288
disconnected!" is shown.   However, if I run openssh on Mac by "ssh -L 9188:localhost:9288 x.x.x.x"
instead of the direct_tcpip binary, everything works perfectly fine.

I am grateful if somebody may tell me if there are any ways to turn on debugging on Libssh2 to check where the
problem lies.  Any kind of instructions/advice will be highly appreciated.  Thanks in advance.

Regards,

Lillian Poon
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

double | 5 Apr 2010 20:35
Picon
Picon

Getting filetype

Hello,

How can I determine if a remote file is a directory? There is a
"LIBSSH2_SFTP_TYPE_DIRECTORY" defined, but this is nowhere
used in the source. And the struct LIBSSH2_SFTP_ATTRIBUTES
does not contain a "type" element.

Thanks a lot
Marcus

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

Jose Baars | 6 Apr 2010 00:38
Favicon

Re: small patch to userauth.c

Oops! Believed the compiler when it said :

In this statement, the referenced type of the pointer value "session->userauth_host_packet" is "unsigned char", which is not compatible with "char" because they differ by signed/unsigned attribute.

Attached a new patch with casts to void *.

Jose


2010/4/4 Daniel Stenberg <daniel-7AX/Qt632QQ@public.gmane.org>
On Fri, 2 Apr 2010, Jose Baars wrote:

I got several compiler warnings when compiling userauth.c caused by missing or incorrect casts.

I have added a patch that solves these.

Thanks, but the iov_base field within the struct iovec is said to be a 'void *' in POSIX and in my linux headers, so why not typecast to that?

--

 / daniel.haxx.se

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

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Daniel Stenberg | 6 Apr 2010 23:31
Picon
Favicon
Gravatar

Time for release!

Hi friends,

In 7 days, on April 13th, I plan to ship the next release of libssh2. Please 
don't push any new features until then, but feel free to fix bugs if you find 
any!

--

-- 

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


Gmane