SSH login issues

  • Hi to all


    I've just completed a fresh install on my pi. Enabled ssh through the web gui but no luck logging in. I had a look at the ssh_config file and noticed there was no line 'PermitRootLogin' so added that with a yes. Still no luck.


    Next I added a new user through the web gui and then updated the ssh_config with AllowUsers username.


    I'm quite new to Linux so I'm sure I must be missing something obvious but just not seeing it


    Thanks for any help

  • I had a look at the ssh_config file and noticed there was no line 'PermitRootLogin' so added that with a yes

    You have to look in sshd_config and make changes there. After that you need to reboot or


    service sshd restart


    Better option: enable root login in the gui of OMV in the SSH section.

  • Could you specify what "no luck" means? Can you connect to the server, but the credentials are rejected?
    For user access to ssh, the user needs to be a member of the "ssh" group.


    Be aware that the root password is different from the admin passwort for the web gui. The root password is set during installation.


    There's no need for manually editing the ssh-config, you can do the required changes using the web gui.

  • Hi and thanks for the replies.


    Macom - I had a look in the sshd_config file and found 'AllowRootLogin' already set. I added 'AllowUsers' as well. Restarted the service but I still get the same. Note - I did set up in the gui originally as well.


    Guzzisti - I can connect to the server with Kitty and presented with a login prompt. I can try 'root' or the user I set up in the gui and I get 'Access Denied' for both. I'm not using the 'Admin' account.


    The only bit I'm unsure of the ssh group. Is this a group within linux that I'm supposed to add the user to or a group in the gui?


    Cheers

  • Sorry another thing to mention. If I go to Diagnostics > Services in the gui I can see the below when trying to login through ssh. Not sure if this helps:


    Currently logged in users:
    root tty1 2018-12-22 12:44 00:04 1643


    Connections:
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    sshd 2635 root 3u IPv4 23108 0t0 TCP 192.168.0.125:22->192.168.0.173:60426 (ESTABLISHED)
    sshd 2638 sshd 3u IPv4 23108 0t0 TCP 192.168.0.125:22->192.168.0.173:60426 (ESTABLISHED)

  • The only bit I'm unsure of the ssh group. Is this a group within linux that I'm supposed to add the user to or a group in the gui?

    You can add the user to the ssh group in the GUI of OMV. Doing this you add it to the "group within linux". OMV is acting as an interface to simplify the configuration of the various services. As normal user it should be sufficient to use the GUI only.


    Using the CLI should be the exception.


    In the picture you can see how to add a user to the ssh group. Go to access-right-management --> user --> edit


    Selection_014.jpg

  • Something about allowing root ssh access has always bothered me, and it was confirmed when Heartbleed was raging and a few users here were hacked... (One was a mod).. this was in the early days, like .2, maybe .3.


    It's much safer to ssh as an unprivileged user, then change to root. At the very least it's another layer of protection

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!