Giter Club home page Giter Club logo

Comments (6)

townsend2010 avatar townsend2010 commented on August 25, 2024 1

@simos, I took your advice and updated the upstream bug report with some more info including linking to this bug. I do think the libssh maintainers simply have not been active this week:)

from multipass.

townsend2010 avatar townsend2010 commented on August 25, 2024

After much debugging, I found this to be a bug in libssh.

In it's polling of stdin, it does not check if POLLHUP (which indicates EOF) is set on the fd. It's a very simple fix and I'll plan on proposing it in upstream libssh. In the meantime, we'll probably need to patch the version we are using.

from multipass.

townsend2010 avatar townsend2010 commented on August 25, 2024

BTW, here is the simple diff:

diff --git a/src/connector.c b/src/connector.c
index 54e85241..714ef815 100644
--- a/src/connector.c
+++ b/src/connector.c
@@ -368,7 +368,7 @@ static int ssh_connector_fd_cb(ssh_poll_handle p,
 
     if (revents & POLLERR) {
         ssh_connector_except(connector, fd);
-    } else if((revents & POLLIN) && fd == connector->in_fd) {
+    } else if(((revents & POLLIN) || (revents & POLLHUP)) && fd == connector->in_fd) {
         ssh_connector_fd_in_cb(connector);
     } else if((revents & POLLOUT) && fd == connector->out_fd) {
         ssh_connector_fd_out_cb(connector);

from multipass.

townsend2010 avatar townsend2010 commented on August 25, 2024

Here is the upstream bug report:

https://bugs.libssh.org/T81

from multipass.

townsend2010 avatar townsend2010 commented on August 25, 2024

Still no response from upstream. If we don't get a response soon, we should probably clone our own libssh branch, fix it, and point our submodule to it.

from multipass.

simos avatar simos commented on August 25, 2024

I think the bug report on libssh would need a bit of description to demonstrate the issue.

With plain SSH, the following works

$ echo bar | ssh localhost tee foo
bar
$ 

Perhaps a link to this report or a suitable example with plain SSH that demonstrates the issue?

from multipass.

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.