Setting up SSH for user (as opposed to root) access

  • For all of my SSH needs up until now, I've been connecting using the root account in order to handle system maintenance. However, I understand this isn't a best practice and I'd like to transition to using a regular user account for SSH.


    I went to the Users tab and added my user to the group ssh. Now I can connect and the basics work. However, it's complaining about things like no home directory, the prompt looks different, and things like the backspace key and tab name auto-completion don't work properly.


    Was there a different procedure I was supposed to follow to set up a regular user for SSH access? Did I do something wrong? How do I fix this?

  • You probably should have created the user first. Then modified the ssh group.


    Access Rights Management | User | Add

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • You need to add a bash login instead of pure shell or dash. Otherwise things like autocomplete or ctrl+r don't work.
    You can do that from the users management. If the user is not there means it has uid below 1000 then edit /etc/passwd file to the login.

    Thanks, that worked. Is there a reason why it's desirable to default a user to dash?


    I still have the problem with no home directory. I went to home and tried to create one, but I'm not quite sure how to do so. I tried to sudo mkdir a home directory, but apparently this user isn't authorized to use sudo? How do I correct that? Is this something I'm supposed to be doing manually?

  • Thanks, I have things mostly working. Only one odd quirk I'm noticing. Password fields in my ssh session have their input visible for a split second before they disappear. Anyone have any idea what might be causing this?

  • Did you set the proper home directory config in Users? You should not have to create the home directory manually.

    Check the home directory location of the user and make the user member of the group ssh.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

Jetzt mitmachen!

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