SSH access with password authentication disabled

Under the Security / SSH section of the basic administrative settings is found a toggle called “Password authentication”, annotated simply as “Allow password authentication for SSH”.

It is deeply unclear what are they intention and effect of the setting. If password authentication is disabled, then either access by SSH is disabled entirely, or authentication is allowed only by public key.

In the first case, the option seems misnamed, whereas in the second case, it remains an open question how keys are to be installed.

I am seeking some clarification over the meaning of the option, and also wondering whether other naming would be more suitable.

Some info here

Disabling it means SSH only accepts key-based logins, it does not turn SSH off. Before switching it, add your public key for the admin user and check that you can log in with it from a second terminal while keeping your current session open. That way you can’t lock yourself out.

Since the user interface seems to provide no mechanism for users to manage keys, I am trying to understand the expectation for usage.

Is it expected that users manage their own keys by modifying the relevant files from a shell prompt?

Users can manage their own keys from a shell, but as an admin you can also do it from the CLI: yunohost user ssh add-key <username> "<public key>", with list-keys and remove-key to check or revoke them. The keys end up in the user’s ~/.ssh/authorized_keys. Also make sure the user has the ssh.main permission, otherwise the key alone won’t let them in.

Thank you for the explanation.

It is unexpected that the graphical interface would allow entry into a mode in which keys are required for authentication, while the same interface provides no means for users to manage keys.

If password authentication is not allowed for SSH, and a user has not configured authentication by keys, then the user is left with no means either of opening a shell or of adding keys.