Code Monkey home page Code Monkey logo

Comments (3)

pkittenis avatar pkittenis commented on May 18, 2024

Hi there,

Thanks for the interest and report.

Yes, this is an issue with the process_startup function. For shell requests, no message should be sent but the function does not allow that. An empty string as the message (as opposed to no message), is not accepted by the server which terminates the connection.

The next version will have a channel.shell() function which was missing - the libssh2 macro for shell process startup - as well as a revised process_startup which allows for no message.

From next version onwards:

channel = session.open_session()
channel.shell()
channel.write('my command\n')
size, data = channel.read()
<..>

Note that a pty is not explicitly required for interactive shells though it may be used.

from ssh2-python.

xavierhardy avatar xavierhardy commented on May 18, 2024

Yes indeed, the macro in libssh2 uses a null pointer as message. My knowledge of Cython is limited, but I'll try to submit a pull request if I find the time. Thanks a lot!

from ssh2-python.

xavierhardy avatar xavierhardy commented on May 18, 2024

That was fast, it's small fix but still. Thanks a lot, though I will open a new ticket. I would like to test your branch and the only way to find how to build it was to look at Travis. Keep up the good work!

from ssh2-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.