-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: new option "executeCommand" #5
Comments
Hi @Eichhorst. What kind of commands are you thinking of executing? Something that sets up stuff and exits quickly (eg: a I want to understand the use-case before designing new features. |
Hi,
first of all: thanks for your work and your reply!
my use-case would be to execute sudo -i automatically.
I would like to use workspace environments, which files require root permission.
best,
Tom
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
…On Saturday, November 9, 2019 11:59 PM, thingalon ***@***.***> wrote:
Hi ***@***.***(https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#5?email_source=notifications&email_token=AMP2KOCUXVLIXEN65VZNAQLQS46GHA5CNFSM4JHJDVQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDURD4I#issuecomment-552145393), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AMP2KODW67ILFWL2Q6BKL7LQS46GHANCNFSM4JHJDVQA).
|
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 I've prepared a new update which allows you to specify a custom shell command; which will allow you to call
With the above setup, pony-ssh would allow you to edit any files that you can via 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. |
Hi,
nothing to apologize for!
sudo-ing without pw is no problem.
will it be possible to edit any root-files by defining "shell": "sudo bash -i" then?
Thanks again for your work!
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
…On Monday, 18. November 2019 08:11, thingalon ***@***.***> wrote:
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](#6)
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#5?email_source=notifications&email_token=AMP2KOGLBU3LZO5TZGKRQG3QUI53JA5CNFSM4JHJDVQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEJNN7I#issuecomment-554882813), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AMP2KOHTL65BRF7LGLZFCVDQUI53JANCNFSM4JHJDVQA).
|
I've just released an update to Pony-SSH which will hopefully meet your needs. try adding the following to your configuration: Don't use the Hope this helps you out. Let me know if you run into trouble. |
works perfectly, thx!
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
…On Sunday, 24. November 2019 05:52, thingalon ***@***.***> wrote:
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#5?email_source=notifications&email_token=AMP2KOC3BWS47YQS44L3RPDQVIB7FA5CNFSM4JHJDVQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFADYOQ#issuecomment-557857850), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AMP2KOETMCQU2QJIXQ37C43QVIB7FANCNFSM4JHJDVQA).
|
👍 Glad I could help. |
If executeCommand is specified, it is executed on the remote host on login.
The text was updated successfully, but these errors were encountered: