Giter Club home page Giter Club logo

Comments (7)

wouterdebie avatar wouterdebie commented on August 29, 2024

Nice suggestion! The only thing is that you'll not see any errors if they happen and ssh gets terminated. I think I'll make it an option you can toggle.

from i2cssh.

campbsb avatar campbsb commented on August 29, 2024

from i2cssh.

campbsb avatar campbsb commented on August 29, 2024

Found an issue with this - the iterm2 Python API doesn't play well with SSH multiplexing. If an i2cssh SSH session with 'ControlMaster auto' initiates the control channel, then closing the i2cssh window will close all subsequent ssh sessions to the host which are using the same control channel, when using exec. The same issue occurs when using https://iterm2.com/python-api/examples/launch_and_run.html to start ssh sessions

from i2cssh.

wouterdebie avatar wouterdebie commented on August 29, 2024

from i2cssh.

campbsb avatar campbsb commented on August 29, 2024

I've raised an issue against iTerm2 (see URL in the comment), and here's a workaround:

diff --git a/i2cssh b/i2cssh.orig
index 8727d7e..c71db64 100755
--- a/i2cssh
+++ b/i2cssh.orig
@@ -267,9 +267,7 @@ def exec_in_iterm(groups, opts):
                                                        host_opts.get("gateway"))

                         if host_opts.get("exec"):
-                            # Set ControlMaster=no as a workaround for
-                            # https://gitlab.com/gnachman/iterm2/-/issues/11032
-                            ssh_prefix = f"exec {ssh_prefix} -o ControlMaster=no"
+                            ssh_prefix = f"exec {ssh_prefix}"

                         if s := host_opts.get("sleep"):
                             await asyncio.sleep(s)

from i2cssh.

wouterdebie avatar wouterdebie commented on August 29, 2024

@campbsb cool! I've added this to 0.0.20. Mind keeping track of this issue for me, so we can revert if this is fixed in iTerm2?

from i2cssh.

campbsb avatar campbsb commented on August 29, 2024

from i2cssh.

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.