Change ssh conf parameter

,

Nethserver 7.5
File: /etc/ssh/sshd_config

I created a template-custom (/etc/e-smith/templates-custom/etc/ssh/sshd_config/10ssh and the values that I added are displaying great in the original /etc/ssh/sshd_config after an expand-template, but how can I change an existing paremeter like from “PasswordAuthentication yes” to “PasswordAuthentication no”?

any help is appreciated.

Hi Vlad,

PasswordAuthentication is editable from web UI too.

To save PasswordAuthentication and several other params, Nethserver uses the config database. No custom template is needed in this case.

[root@testserver ~]# config show sshd
sshd=service
    LoginGraceTime=2m
    MaxAuthTries=6
    PasswordAuthentication=yes
    PermitRootLogin=yes
    Protocol=2
    TCPPort=22
    UsePAM=yes
    access=green,red
    status=enabled

To change PasswordAuthentication to no:

config setprop sshd PasswordAuthenication no

To apply the changes:

signal-event nethserver-openssh-update

I saw you are using version 7.5, I recommend to update, next week Nethserver 7.7 will be available in the Software Center.

1 Like