SSH locked out (root and standard user)

  • ?( Hello folks,


    I was happily using my OMV 1.19 when all of a sudden the SSH Root Access (protected by google multi factor auth) stopped working.
    It does not recognize the password anymore and it does not ask for the Google Authentication Code,


    I can logon on the WEBUI, but that is it.


    If I could edit the SSD_CONFIG file, I'd try to remove the "Use PAM" option, it helped me fix problems with the other NAS I have.


    I tried the procedure to create a public key, but I get the error <<permission denied public key>>


    I realy need to get SSH ROOT back up, what can I troubleshoot?


    • Offizieller Beitrag

    How did you configure the authenticator in the first place?
    Don't tell you just manually edited the file at /etc/ssh/sshd_config?


    If you don't have extra options and you have not set up environmental variables then make a change in the webui for ssh. That should default it.
    If you modified the pam module then i guess is more trouble.


    Try and create a sshd alternate config file in a samba share for example without the pam yes, the use the cron task to run a tmp side sshd server.


    /usr/sbin/sshd -p 2222 -f /media/<uuid>/share/sshd_config


    That should give you access at port 2222

  • Thanks a mil for helping!


    I followed this guide to install the dual factor authentication (it has been working for 2 years now)
    howtogeek.com/121650/how-to-secure-ssh-with-google-authenticators-two-factor-authentication/ therefore, YES, I did edit manually the

    sudo nano /etc/pam.d/sshd
    and sshd_config

    As per the instructions.


    I have created the second alternative SSHD conf file an configured CRON,
    It has fixed the problem!


    Thank you

    • Offizieller Beitrag

    YES, I did edit manually the


    sudo nano /etc/pam.d/sshd
    and sshd_config


    For the pam module do a backup for obvious reasons, for the sshd_config you cannot edit the file, omv will rewrite as soon as you do a change in the ssh section or users section, and you will get lock out as it happened now, this has being discussed in numerous occasions, OMV takes full control of the services it uses.
    Use environmental variables to change the default directives present. This has been discussed in se


    http://wiki.openmediavault.org…Environment_Variables/all
    http://wiki.openmediavault.org…tle=Environment_Variables


    You need to restart engined after a var has being added. And remake the service configuration and restart the service

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!