ssh root login

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
hatahata
Posts: 26
Joined: Thu Jul 07, 2016 3:42 am

ssh root login

Post by hatahata »

hi all.
i rewrite /ets/sshd_config

Code: Select all

cat /etc/ssh/sshd_config | grep Root
PermitRootLogin no
  
at present i can still do root login by ssh-client on dietpi openssh-server .
how to prevent it ?

this may damage the usage of dietpi as server .
ssh is very convinient for remote manipulation .

---
regards
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: ssh root login

Post by Fourdee »

hatahata wrote:hi all.
i rewrite /ets/sshd_config

Code: Select all

cat /etc/ssh/sshd_config | grep Root
PermitRootLogin no
  
at present i can still do root login by ssh-client on dietpi openssh-server .
how to prevent it ?

this may damage the usage of dietpi as server .
ssh is very convinient for remote manipulation .

---
regards
Did you restart the ssh service after making those changes?

Code: Select all

service ssh restart
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
hatahata
Posts: 26
Joined: Thu Jul 07, 2016 3:42 am

Re: ssh root login

Post by hatahata »

thanks.

i did
/etc/init.d/ssh restart

Code: Select all

  

comment-out.bat /etc/ssh/sshd_config
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes

Code: Select all

cat comment-out.bat                     
awk '$1 !~ "#"{print}' $1 | awk 'NF >0 {print}' -
-----------------
regards
Post Reply