Ismail Aseen | 30 Jul 19:11 2015
Picon

libssh2 nonblocking sftp write fails with Tectia SFTP server in Windows

Hi All,

I used the example code sftp_write_nonblock.c and tried to upload a large file(around 1 gb) to a Tectia SFTP server in Windows box, it failed around 300MB.
 This same program works fine with a linux SFTP server and  the linux sftp client can write the same file to Tectia server too. This 300MB value is when the below highlighted buffer is 30000 (i.e. if I call the sftp write with a 30000 sized data buffer). If I changed it to 1 the transfer get stuck at 11K, when the buffer is 2 then the transfer freezing  size is 21K. In both ends connection is not ended but it waits without any progress. Could you all help me to figure out what is the problem with this Tectia - Libssh2 combination.




Thanks,
Ismail.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Kishore Av | 22 Jul 15:21 2015
Picon

Issue in executing command

Hi,
Thanks for your responses.
Error during executing command using libssh2_channel_exec function.
Error: Failed in waiting for channel success.
I checked to log in router,
It says, Direct command exec request not supported.
If i use write API, it blocks and not processing further.
Can anyone tell me what the issue cause and any possible ways to execute commands?

Thanks, kish

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Kishore Av | 21 Jul 16:26 2015
Picon

About libssh2

Hi,

I have few doubts about libssh2.
As i checked in doc, both RSA and DSA uses in libssh2,
Which encryption scheme is used in libssh2?
what is the length of the key used in libssh2 ?

Thanks

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Srikanth Bemineni | 17 Jul 20:41 2015
Picon

Input command echo's back when read back from the channel

Hi,

We  used libssh2 to execute a remote command to check if a process is running or not. We created a vanilla pty. Once the channel is created, using  libssh2_channel_write() we input the command onto the channel. Once the command is completed we try to read the output using libssh2_channel_read() method. The output buffer received has input command along with result of the command It also contain some un recognizable characters Please find the example below.

Command: ps -efww | grep -i Sample* | grep -v grep | awk -F" " '{for(i=8;i<=NF;i++) {printf $i " "} printf "\n"}'

Output buffer:

ps -efww | grep -i Sample* | grep -v grep | awk -F" " '{fof <-i Sample* | grep -v grep | awk -F" " '{for (i=8;i<=NF;i++) {printf $ [ junk characters ]

<-v grep | awk -F" " '{for(i=8;i<=NF;i++) {printf $i " "} printf "\n"}'

/root/Desktop/SampleProc

$

Can I get some directions on how to remove this.? also can you please enlighten me on the concept of the channels.

Thank you

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Kishore Av | 16 Jul 15:03 2015
Picon

Authentication issue

Hi,

If my target server doesn't required any username/password to connect. Say eg. SSH <IP Address>.
Here, userauth_password throws failure error, if i pass empty string or none to the password.

How should i authenticate if there is no username or password?

How can i create channel without invoking userauth_password?

Thanks in Advance
Kishore

On 16-Jul-2015 3:33 am, "Peter Stuge" <peter-Y+HMSxxDrH8@public.gmane.org> wrote:
Kishore Av wrote:
> Please let me know the dependencies to code using libssh2 client library.

libssh2 itself and your choice of one of the supported crypto libraries.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Kishore Av | 15 Jul 20:48 2015
Picon

LIBSSH2 dependencies

Hi,

Please let me know the dependencies to code using libssh2 client library.

Thanks
Kishore

On 09-Jul-2015 11:59 pm, "Peter Stuge" <peter-Y+HMSxxDrH8@public.gmane.org> wrote:
Kishore Av wrote:
> What's the max limit of bytes we can send as command in
> libssh2_channel_exec API.

That depends on the server OS kernel as much as the server-side SSH
implementation. You can control neither.


> As i tried, 34,725 bytes of string can be sent as command in that api.
> I using loop say it iterates till 4mb. First iteration,
> libssh2_channel_exec success in executing command, but from 2nd
> iteration getting fails - throws error - unable to send channel
> request.

As I explained, you must use a special program on the server to
facilitate the execution of multiple commands. You will have to
create and supply that program, ideally as part of setting up the
channel.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Raghaw Shukla | 14 Jul 13:58 2015
Picon

Executing command over forwared port.

Hi,

Can anybody let me know how to execute some command overa forwarded port.

I am able to forward a port with one tunnel in between .I want to execute a commmand over a system which on tunnel ie remote PC.Is it possible in LIBSSH2.

Also it is possible to to create multiple tunnels using LIBSSH2 and do file transfer from my local PC to remote PC with one SSH server machine in between.

--
Raghaw Shukla

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Raghaw Shukla | 8 Jul 08:31 2015
Picon

doing SFTP/SCP over a forwarded channel.

Hi ,

 here goes my requirement.I want to do an sftp/scp to a forwarded port.ie i want to send one file from my PC to a Remote Linux machine  with one more PC in between which will act as SSH host.

So its like MY PC--------->LINUX PC(SSH HOST)--------------->REMOTE PC.

I want to send a file to Remote PC .

Can any body tellme the way to do it.

--
Raghaw Shukla

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Kishore Av | 7 Jul 09:41 2015
Picon

Executing commands for channel

Hi,

I'm new to SSH and Iibssh2 library.
I need to know how to send continuous commands to execute with remote host.
As i tried, per command for per channel can be executed.
If i create and disconnect channel per command, then i can execute continuously.
But creating and deleting channel for continuous configurations say, 200 commands, it leads performance issue.
I need a design of creating and deleting channel at last once i execute bulk commands.
Could anyone please help me to implement.

Thanks
Kish.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Raghaw Shukla | 6 Jul 19:05 2015
Picon

Crash at libssh2_init

Hi, 

When i am just writing  libssh2_init().This simply crashes the application.This function initializes the crypto lib  this thing i am aware of.I am not using as of now any multithreading.Can any body tell me what wrong i have done.I am using QTCreator with  mingw on windows.

--
Raghaw Shukla

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Michael Enright | 30 Jun 02:33 2015

Failed to build on cygwin

The attached configure + make log tells the whole story (I hope).

The environmental details that might not be surfacing there are:
Win7 64 with 32-bit Cygwin

My observation is that the link error is for WsaGetLastError from
misc.o, and I don't really see any '-lwsock32' or similar strings in
the link command.

I have built my project on Linux but I wanted to see if it would work on Cygwin.

For my own reasons I have trepidations about updating Cygwin in any
way so I thought building from source would do the trick.

Other than this the development process has gone smoothly and I'm
grateful to be able to use this library. I especially appreciate the
way it seems to be very flexible about its crypto dependencies.

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

Gmane