#ssh cannot disable password

1 messages · Page 1 of 1 (latest)

flint quiver
#

Hello, i have start with my first ubuntu (server 2022 lts) but i cannot disable password can you help me ?

toxic vortex
#

What have you done to try and what are you trying to disable, user-wise?

flint quiver
#

i have set PasswordAuthentication no
and ```PubkeyAuthentication yes

Expect .ssh/authorized_keys2 to be disregarded by default in future.

AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2

after that i have restart the service for sshd and reboot the server, the authentification with key work but other can connect with password
#

I want to force every user to already have an ssh key in .ssh/authorized_keys for connect else block the connection

tidal pier
#

That's not how that works; "else block the connection". The most sshd can do is close the connection because of missing keys in this case, it's not a firewall, it cannot "block" per se.

#

Run both ends with very verbose switches, and see, otherwise provide it, in complete.

toxic vortex
#

Well, I think they're trying to disable keyboard-interactive/password authentication to ssh, and require keys.

toxic vortex