Peter,

  I will describe the problem in more detail.
My test code is based on libss2.c for you know its a ssh shell example(my test ssh server running on sun os 5.1), with adding an editline for shell command and adding another editline for shell response. Adding libssh2_channel_write() for shell command and libssh2_channel_read() for shell response.

Some shell commands, such as "ls""who""pwd" works well except "ls -l" or "cd ..". For example, "ls -l" response "ls -", another "ls -l" response "ls -", but if followed "ls", response the format of "ls -l". The same to "cd .." response "cd .". It seems simple but not works.
  If I using API "libssh2_channel_exec()" and read response, It works.



--------------------------------------------------
From: "Peter Stuge" <pe...@stuge.se>
Sent: Monday, September 21, 2009 10:27 PM
To: <libssh2-devel@cool.haxx.se>
Subject: Re: using ssh2  on linux shell

Hi Bill,

bill_m...@hotmail.com wrote:
  I studied the example of libssh2.c, which using a shell.

  I can exe shell like "who", "ls" and so on , but not "cd .." or
  "ls -l", but they can exe on command mode, I do not why? Help?
  pls.

How do you think we can help you? How would we know why? You haven't
even investigated to find the lowest level of the problem.

Please read http://www.chiark.greenend.org.uk/~sgtatham/bugs.html now.

You must explain what the problem is very carefully in order to get
any help. We need to understand the problem before we can help you.
Ideally you should provide code that you have tested extensively to
always reproduce the problem. That way we can study the problem
occuring with much greater detail than you can describe via email.

Please explain your problem.


//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

Reply via email to