Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
25% Recurring Discount on NVMe VPS
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
CloudLinux
Shells Virtual Desktop
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.

VirtFusion overriding SSH settings, any way to revert?

datdutchdatdutch Member

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?

  • xvpsxvps Member
    edited May 2024

    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.

    Thanked by 1yoursunny
  • SanjeevSanjeev Member

    @datdutch said: 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?

    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.

  • @datdutch said:
    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?

    /etc/ssh/sshd_config.d check that location for additional configuration files.

    Thanked by 1datdutch
  • edited May 2024

    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.

    Thanked by 1datdutch
  • LeviLevi Member

    Even chattr'ed file can be deleted and replaced with default. Address this to support.

    Thanked by 1datdutch
  • edited May 2024

    @Levi said:
    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.

    Thanked by 1datdutch
  • Uninstall cloud-init components and try again.

    Thanked by 1datdutch
  • Solved by removing /etc/ssh/sshd_config.d/50-cloud-init.conf

    Uninstall cloud-init components and try again.

    also uninstalled this, thanks

    Thanked by 1VirtFusion
  • datdutchdatdutch Member
    edited May 2024

    Next time I will just be generating a key.
    Very nice Control Panel :smile:

    Thanked by 1VirtFusion
  • 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.

  • @MeAtExampleDotCom said:
    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.

  • @totally_not_banned said:

    @MeAtExampleDotCom said:
    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.

  • edited May 2024

    @MeAtExampleDotCom said:

    @totally_not_banned said:

    @MeAtExampleDotCom said:
    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.

    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.

Sign In or Register to comment.