Score:0

Enable ssh login with password for a user

pn flag

I am the admin of a Ubuntu 20.04 server and I want to enable ssh login for a user through password, rather than using key pairs.

The /etc/ssh/ssh_config file on the host looks like this (<username> is replaced by its actual username):

Host*
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes

Match User <username>
    PubkeyAuthentication no
    PreferredAuthentications password
    PasswordAuthentication yes

Still, when he tries to login as:

ssh \<username>@\<host>

he receive an error:

Permission denied (publickey)

What am I doing wrong?

hr flag
AFAIK the ssh_config file is for configuring the host's ssh *clients* - it's the `sshd_config` file that controls the server's permitted authentication methods.
A.Manfreda avatar
pn flag
Wow, I am so dumb. It is working now. Cannot believe the amount of time I lost by editing the wrong file... Thank you very much!
in flag
@steeldriver, you should post that as an answer.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.