[Security Enhancement] Permitting root login only from localhost/docker or specific ips #9498
spathizilla
started this conversation in
Improvement Requests
Replies: 1 comment
|
Totally agree. Requiring Coolify to login as
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is mostly just a suggestion in documentation improvements rather than anything in Coolify itself.
In the worst case event of a root ssh privkey leakage from Coolify, it would be possible for someone to take over servers. Obviously no one wants that. I have never liked allowing root login from anywhere as sudo works fine but Coolify needs to use it.
It is possible to configure sshd to allow root privkey usage for a very specific set of addresses which then disallows the key from anywhere else. This would mean any leaked privkeys become basically useless. In this example I have set it to allow from localhost and docker containers (for Coolify where used on the same machine).
In sshd_config I have PermitRootLogin set to no.
In sshd_config (at the end of the file - this is important):
Other rules could be added where Coolify is running on a different server in the same format of "Match address ".
The Match All is just there as a catchall for anything else.
I have this already implemented with my Coolify instance and the servers it manages.
This is mostly aimed at deployments not using the Coolify Cloud as I'd guess that has way more ips in use.
All reactions