Skip to content
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

Allow to run ssh commands to localhost #105

Open
pierrelemee opened this issue Oct 17, 2024 · 0 comments
Open

Allow to run ssh commands to localhost #105

pierrelemee opened this issue Oct 17, 2024 · 0 comments

Comments

@pierrelemee
Copy link

Allow to run ssh commands to localhost

TL;DR: as a user I might want to run SSH commands to a local Docker container. For this, I would propose to add a configuration method allowLocalConnection

I'm trying to execute a set of SSH commands onto a server through Castor 🦫 . As it's aimed to configure a distant server, I'm testing it on a local Docker container (basically a debian base image with the relevant ssh config on top of it) to be able to wipe and start over (using the --force-recreate Docker option).

However, when testing I faced a "Permission denied" error that, after digging, revealed to be caused by the local command override in the Ssh::getExecuteCommand() method.

Although I understand this check, as a developer I would like to be allowed to overcome this by allowing local connection using a Ssh::allowLocalConnection method, like it's done for host check or password authentication. By default, the underlying variable would remain false to keep nominal behavior.

I can propose a patch for it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant