By hrsetyono
I’m wondering if it’s possible to do as mentioned in title.
I want root to still not allow password, but a user is allowed to do so.
The reason is because I need to setup Github Action auto-deployment using https://github.com/sebastianpopp/git-ftp-action and the script is bugged to only allow SSH password.
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
So I’m thinking of a hacky solution. After changing the PasswordAuthentication to yes, what if I simply do not set the root password?
That way nobody know the password and my root is still basically secured to PubKey only.
But is there such thing as default root password? If there is, how strong is it?
Hello, @hrsetyono
What you can do is to tweak the ssh config file and allow only PubKey authentication for the root username and have the PasswordAuthentication for the other users enabled.
You can use Match in the sshd_config
PasswordAuthentication no
Match User root
PasswordAuthentication yes
Match all
and then restart the ssh daemon.
Hope that this helps!
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.