nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.25k stars 320 forks source link

CLI: SSH Support #1319

Open ava-affine opened 1 week ago

ava-affine commented 1 week ago

unitctl should support configuring and interacting with instances over SSH, but should not automatically log into servers without a specific invocation from the user (unitctl instances should not seek instances over SSH). CLI needs to handle control sockets specified over SSH at least with file sockets, and preferably with TCP endpoints as well. This applies to the following subcommands:

avahahn commented 2 days ago

So, the general solution to this in my opinion is to open an SSH tunnel on demand for the user and then interact with the control API over it (or perhaps via SSHFS in the case of a Unix socket). At the moment the user can already configure either of those externally, but it would be a value add that Unitctl does this for them.

That said, I have qualms:

The reason why we are tracking this is to make sure we are at feature parity with unitc so that we can standardize on unitctl instead.

@lcrilly Im interested if you feel like this is a priority function or if you feel like we could replace unitc with this work still pending.

lcrilly commented 6 hours ago

Thanks for the tag.

When I think about remote management of Unit I see it in the context of a developer accessing a server that is part of their development environment. So either local VM or a something nearby over a trusted network. I don't think there is much value in building a production-grade control plane.

I'd be happy for unitctl to prioritize local unitd and Docker images, especially as this is in line with other efforts to improve the first-touch developer experience.

Securing the control API with mTLS would be a better investment of engineering effort IMO.

avahahn commented 1 hour ago

Securing the control API with mTLS would be a better investment of engineering effort IMO.

Is there another ticket that tracks this?