New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
VirtFusion overriding SSH settings, any way to revert?
I recently installed a VPS using VirtFusion control panel for the first time. I choose not to generate an SSH key since I'm used to do this on my own machine. After uploading my public key I adjusted the SSH settings file to disable password login, but these settings are overridden and I can still login with password. Hence the question, if there is any way to revert it or do I have to reinstall with SSH key generated by the cp?


Comments
Did you restart the ssh service after modifying the configuration?
I can't help with VirtFusion, but this normally occurs when PasswordAuthentication is set multiple times and PasswordAuthentication yes overrides your changes.
It's the first occurrence of a setting that will sticks.
Reinstalling with a generated SSH key by the control panel might be a practical solution, but reaching out to their support for troubleshooting could also provide insight into resolving the override problem.
/etc/ssh/sshd_config.dcheck that location for additional configuration files.If it's actually messing with your config files you might try something like
chattr +i /etc/ssh/sshd_config. I'm not sure if it actually works with directories too but it would be worth a try. Otherwise just figure out the name of the file it tries to drop into/etc/ssh/sshd_config.d, create a zero length dummy and make that immutable.Even chattr'ed file can be deleted and replaced with default. Address this to support.
Yeah, it's certainly not fool proof (whatever messes with the file system could simply remove the attribute) but a lot of automation just isn't prepared for this making the operation fail. It's just something worth trying.
Uninstall cloud-init components and try again.
Solved by removing
/etc/ssh/sshd_config.d/50-cloud-init.confalso uninstalled this, thanks
Next time I will just be generating a key.
Very nice Control Panel
As others have said, this is most likely due to configuration confusion (or not restarting sshd after changing config).
If your provider is genuinely tinkering with your SSHd settings, accidentally or otherwise, the only sensible recourse would be to move to a different host.
cloud-init is sadly pretty much standard fare. If you exclude hosts just because of this there certainly won't be a lot of options left. It's what hosts use to display stats and provide finer grained functionality (beyond on/off/reboot) in their panels. It's a 100% auto-remove for me too but in this day and age there's little chance of fully escaping it.
Nothing wrong with cloud-init in itself, it is easy to reconfigured/disabled/removed as needed to stop it altering things after the initial build.
If you find it tinkering with SSHd settings after the initial setup due to standard (mis)configuration, then no foul either: just fix/kill it, so it doesn't.
The (potential) issue is if a host was altering SSHd or other auth settings, via cloud-init or any other method: that would be a red flag. I'll happily miss out on panel features, or go elsewhere (even at greater expense) if that is what is needed to keep auth under my control.
That pretty much depends on view point. To me it's something i neither need nor want. From my perspective the panel should reboot my VM and that's it. 90% of my VMs run disk encryption (i have no illusion about this being more than a little hurdle if someone would actually put in some effort to get at the data but it's probably enough to discourage random nosyness) and i have zero intention to give the host any kind of additional backdoor abilities.
Even if it wasn't that i'd remove it because to me it's a pointless daemon and i only install/run what i actually need. In reality it's seldom a topic for me though as usually i just dd prebuilt diskimages to the VMs anyways, which obviously don't contain cloud-init anyways.