[SOLVED] Cant login via SSH to non-root user
by mackowiakp from LinuxQuestions.org on (#56P80)
Cant login via SSH to non-root user in Debian 10 Buster. I want to use only cert auth, not passwords both for root and users.
It worked for me in Ubuntu 14.04 Stretch. Of course I have in ~/.ssh dir public keys in authorized_keys file. This files have the same content for root and for user. Of course dir and file owner/group/mod is set according to rules.
Below SSH daemon config file:
Code:[root@Piotr MEDIA]# cat 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
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
ChallengeResponseAuthentication no
PasswordAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yesWhat I am doing wrong?


It worked for me in Ubuntu 14.04 Stretch. Of course I have in ~/.ssh dir public keys in authorized_keys file. This files have the same content for root and for user. Of course dir and file owner/group/mod is set according to rules.
Below SSH daemon config file:
Code:[root@Piotr MEDIA]# cat 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
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
ChallengeResponseAuthentication no
PasswordAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yesWhat I am doing wrong?