Re: Error reporting of libssh2_sftp_xxxx functions.

2009-03-23 Thread Peter Stuge
Jean-Louis CHARTON wrote: > I was expecting a more accurate error code like > LIBSSH2_FX_FILE_ALREADY_EXISTS or something like that instead. Request more debug information. Enable tracing in libssh2 for lots of output. //Peter

Re: Receiving intermediate results from an application

2009-03-23 Thread Peter Stuge
Bob Alexander wrote: > Not sure I want to get into setting up a subsystem on the server, With OpenSSH that is a matter of adding a line like this to sshd_config: Subsystem c...@stuge.se /bin/cat (Please do include @your.domain.name because names without @ are reserved for future standardized sub

Re: RE : Error reporting of libssh2_sftp_xxxx functions.

2009-03-23 Thread Daniel Stenberg
On Mon, 23 Mar 2009, Jean-Louis CHARTON wrote: > It seems that many more new error codes have been added in newer revisions > of the RFC. See for example > http://tools.ietf.org/id/draft-ietf-secsh-filexfer-13.txt : Yeps, and that seems to document SFTP protocol version 6 while libssh2 speaks

Error reporting of libssh2_sftp_xxxx functions.

2009-03-23 Thread Jean-Louis CHARTON
Hi all, I'm quite new to libssh2 and maybe the following problem has already been discussed (if so, excuse me). My problem is that if I try to create a directory thanks to libssh2_sftp_mkdir(), and if the directory already exists on the remote SSH server, libssh2_sftp_mkdir() fails; which is wha

RE : Error reporting of libssh2_sftp_xxxx functions.

2009-03-23 Thread Jean-Louis CHARTON
Hi Alexander, It seems that many more new error codes have been added in newer revisions of the RFC. See for example http://tools.ietf.org/id/draft-ietf-secsh-filexfer-13.txt : SSH_FX_OK0 SSH_FX_EOF 1 SSH_FX_NO_SUCH_FILE 2

Re: libssh2_userauth_publickey_fromfile and the public key file parameter

2009-03-23 Thread Daniel Stenberg
On Mon, 23 Mar 2009, Jean-Louis CHARTON wrote: > So could it be possible to make libssh2_userauth_publickey_fromfile() > function work with the pubkeyfile parameter set to NULL ? Yes I believe it could: http://sourceforge.net/tracker/?func=detail&aid=1655430&group_id=125852&atid=703942 --

Re: Error reporting of libssh2_sftp_xxxx functions.

2009-03-23 Thread Alexander Lamaison
2009/3/23 Daniel Stenberg : > On Mon, 23 Mar 2009, Jean-Louis CHARTON wrote: > >> I was expecting a more accurate error code like >> LIBSSH2_FX_FILE_ALREADY_EXISTS or something like that instead. > > There is no such code available! See > http://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/dra

libssh2_userauth_publickey_fromfile and the public key file parameter

2009-03-23 Thread Jean-Louis CHARTON
Hi, I have already asked the following question on the IRC channel but had no reply. I'm pretty sure the publickey file is not necessary at the client side to successfully authenticate to an SSH server and that the private key would be sufficient. And indeed, this is the way I use openssh ssh cl

Re: Error reporting of libssh2_sftp_xxxx functions.

2009-03-23 Thread Daniel Stenberg
On Mon, 23 Mar 2009, Jean-Louis CHARTON wrote: > My problem is that if I try to create a directory thanks to > libssh2_sftp_mkdir(), and if the directory already exists on the remote SSH > server, libssh2_sftp_mkdir() fails; which is what I'm expecting so far; BUT > the error returned by libssh

Error reporting of libssh2_sftp_xxxx functions.

2009-03-23 Thread Jean-Louis CHARTON
Hi all, I'm quite new to libssh2 and maybe the following problem has already been discussed (if so, excuse me). My problem is that if I try to create a directory thanks to libssh2_sftp_mkdir(), and if the directory already exists on the remote SSH server, libssh2_sftp_mkdir() fails; which is wha

Re: Receiving intermediate results from an application

2009-03-23 Thread Daniel Stenberg
On Mon, 23 Mar 2009, Bob Alexander wrote: > The app on the server dribbles out information on stderr over a period of 45 > seconds, then exits. But my calls to libssh2_channel_read_stderr return > nothing until the server app exits - and then I quickly get all the data > that had been sent. > >

Re: Receiving intermediate results from an application

2009-03-23 Thread Bob Alexander
The server app calls setvbuf(stderr, NULL, _IONBF, 0) and does an fflush after every write. Not sure I want to get into setting up a subsystem on the server, but I'll try putting running the app from an exec channel... - Bob Bob Alexander wrote: It is. I know because (aside fro

Re: Receiving intermediate results from an application

2009-03-23 Thread Peter Stuge
Bob Alexander wrote: > It is. I know because (aside from looking at the code for the server > app) if I log in to the server with an ssh GUI and run the app, I > see the output as the program generates it. That's not very reliable, because there are a few other programs involved when running the a

Re: Receiving intermediate results from an application

2009-03-23 Thread Bob Alexander
It is. I know because (aside from looking at the code for the server app) if I log in to the server with an ssh GUI and run the app, I see the output as the program generates it. - Bob Bob Alexander wrote: Is there something I'm missing? Check that the server side app

Re: Receiving intermediate results from an application

2009-03-23 Thread Peter Stuge
Bob Alexander wrote: > Is there something I'm missing? Check that the server side app is using unbuffered fds, or calling fflush() as neccessary. //Peter -- Apps built with the Adobe(R) Flex(R) framework and Flex Builde

Receiving intermediate results from an application

2009-03-23 Thread Bob Alexander
Hi, I've started using libssh2, but I'm having a problem with receiving intermediate results from an application. I use libssh2 on a Windows client, connect to a Linux or AIX server (the problem occurs on either), run an application on the server by sending a command line with libssh2_channel_

Re: libssh2_sftp_init() blocks and does not return

2009-03-23 Thread Daniel Stenberg
On Mon, 23 Mar 2009, Heiner Steven wrote: > The problem is still there, though: the original code (calling > libssh2_sftp_init() with a blocking socket) still blocks in > libssh2_sftp_init. Yes, but I'm not really interested in that particular problem right now as I'm about to change how we'll

Re: libssh2_sftp_init() blocks and does not return

2009-03-23 Thread Heiner Steven
Daniel Stenberg wrote: > On Sun, 22 Mar 2009, Heiner Steven wrote: > >>> What other alternatives can you think of? Did you try this against other >>> SFTP servers? >> I tested with the local Linux OpenSSH server (5.1) and with a Solaris 10 >> server, also with OpenSSH 5.0. > > Did you also try

Re: Missing symbols in CVS vs 1.0

2009-03-23 Thread Mikhail Gusarov
Twas brillig at 15:49:03 23.03.2009 UTC+01 when dan...@haxx.se did gyre and gimble: >> Probably most of them were exported by mistake, but it needs a double-check. DS> That list looks entirely correct to me! Okay, marked as un-exported in package symbols list. -- pgpJAjUCtH7wA.pgp Descrip

Re: Missing symbols in CVS vs 1.0

2009-03-23 Thread Daniel Stenberg
On Mon, 23 Mar 2009, Mikhail Gusarov wrote: > The following symbols have evaporated from the public interface since 1.0: ... > Probably most of them were exported by mistake, but it needs a double-check. That list looks entirely correct to me! -- / daniel.haxx.se -

Missing symbols in CVS vs 1.0

2009-03-23 Thread Mikhail Gusarov
The following symbols have evaporated from the public interface since 1.0: libssh2_channel_locate libssh2_channel_nextid libssh2_channel_packet_data_len libssh2_htonu32 libssh2_htonu64 libssh2_ntohu32 libssh2_ntohu64 libssh2_packet_add libssh2_packet_ask_ex libssh2_packet_askv_ex libssh2_packet_b

Re: libssh2_session_startup() will enable non-blocking

2009-03-23 Thread Peter Stuge
Daniel Stenberg wrote: > Okay to proceed a bit on my plan to make all internals use > non-blocking sockets: Sounds good. //Peter -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.

Re: [libssh2-cvs] bagder: libssh2/docs libssh2_session_flag.3, 1.1, 1.2

2009-03-23 Thread Daniel Stenberg
On Mon, 23 Mar 2009, Mikhail Gusarov wrote: > Ccmfl> --- libssh2_session_flag.316 Mar 2009 15:00:45 -1.1 > Ccmfl> +Its mere existence is an error > > I propose to drop this function when SONAME will need to be bumped. Yeah, I've added a mention about a removal of it in the TOD

Re: [libssh2-cvs] bagder: libssh2/docs libssh2_session_flag.3, 1.1, 1.2

2009-03-23 Thread Mikhail Gusarov
Twas brillig at 13:17:51 23.03.2009 UTC+00 when libssh2-...@lists.sourceforge.net did gyre and gimble: Ccmfl> --- libssh2_session_flag.316 Mar 2009 15:00:45 -1.1 Ccmfl> +Its mere existence is an error I propose to drop this function when SONAME will need to be bumped. --

Re: win32 patch for setting errno

2009-03-23 Thread Daniel Stenberg
On Mon, 23 Mar 2009, E L wrote: > I don't know what a suitable one would be. Right now, it appears the > libssh2 code only check for 0 and EAGAIN, all else are just handled > under generic errors. ... > Given how the code appears to work, EIO would be as good as any other code. Yeah, I just no

Re: win32 patch for setting errno

2009-03-23 Thread E L
>> I spoke too soon when I said the WSAENOTCONN should be converted to >> ENOTCONN.  ENOTCONN is not defined in win32. > > Please map the error onto another suitable win32 errno then. > I don't know what a suitable one would be. Right now, it appears the libssh2 code only check for 0 and EAGAIN,

libssh2_session_startup() will enable non-blocking

2009-03-23 Thread Daniel Stenberg
Hi Okay to proceed a bit on my plan to make all internals use non-blocking sockets: * have the libssh2_session_set_blocking() function decide blocking or non-blocking API behavior, * start with making making libssh2_session_startup() simply force the socket to non-blocking state unconditi

RE: Username/PublicKey combination invalid

2009-03-23 Thread Mononen Jussi
> maxge...@tiscali.it wrote: > > "Username/PublicKey combination invalid" although the private > > keyfile is right, infact when i using it with ssh.exe and with > > plink I will not be any problem. > > Maybe double check the file format. Different SSH implementations do > not neccessarily use the

Re: Username/PublicKey combination invalid

2009-03-23 Thread Peter Stuge
maxge...@tiscali.it wrote: > "Username/PublicKey combination invalid" although the private > keyfile is right, infact when i using it with ssh.exe and with > plink I will not be any problem. Maybe double check the file format. Different SSH implementations do not neccessarily use the same format t

Re: Username/PublicKey combination invalid

2009-03-23 Thread maxge...@tiscali.it
Hello Dan, Thanks for your reply. Yes, in "libssh2_userauth_publickey_fromfile_ex" function i've used both keys, private & public, downloading them from the server. I don't know if is required some type of settings before using "libssh2_userauth_publickey_fromfile_ex". after libssh2_useraut