Code Monkey home page Code Monkey logo

Comments (7)

thingalon avatar thingalon commented on August 20, 2024

Hi @Eichhorst.

What kind of commands are you thinking of executing? Something that sets up stuff and exits quickly (eg: a .profile-like command), or something that runs continuously while Pony SSH is connected to the host?

I want to understand the use-case before designing new features.

from pony-ssh.

Eichhorst avatar Eichhorst commented on August 20, 2024

from pony-ssh.

thingalon avatar thingalon commented on August 20, 2024

Hi Tom. Apologies for the slow response.

I've been thinking about how best to implement this. Pony-ssh uses ssh exec multiple times when setting up a session, so calling sudo -i once on connection won't do the trick.

I've prepared a new update which allows you to specify a custom shell command; which will allow you to call sudo automatically with a config like this:

 "ponyssh.hosts": {
    "example-sudo": {
       "host": "example.com",
       "username": "my-login",
       "agent": true,
       "shell": "sudo sh -c"
    }
  }

With the above setup, pony-ssh would allow you to edit any files that you can via sudo - though it does require that your user can sudo without using a password on the remote host.

Before I roll this out and turn it into a new version, I wanted to check in with you if this sounds like it could solve your problem.

#6

from pony-ssh.

Eichhorst avatar Eichhorst commented on August 20, 2024

from pony-ssh.

thingalon avatar thingalon commented on August 20, 2024

I've just released an update to Pony-SSH which will hopefully meet your needs. try adding the following to your configuration:
"shell": "sudo bash -c"

Don't use the -i parameter; it will kick off an interactive shell, which won't work with pony-ssh. :)

Hope this helps you out. Let me know if you run into trouble.

from pony-ssh.

Eichhorst avatar Eichhorst commented on August 20, 2024

from pony-ssh.

thingalon avatar thingalon commented on August 20, 2024

👍 Glad I could help.

from pony-ssh.

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.