Linux: Disable SSH login with passwords

1153200 pts.
Tags:
Linux
SSH
We're using Linux and I need to disable the SSH login with passwords for some of our users. However, I can't disable the login using certificate. How can I go about this?
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

To block SSH password authetication , you need to modified sshd.config file on Serve.

First 1:= TO stop ssh authentication ,made below change in sshd.config file 

PasswordAuthentication no

Second := TO  allow keys authentication , made below change in sshd.config file 

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile     .ssh/authorized_keys

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Elizine


    Try Match in sshd_config:

    Match User user1,user2,user3,user4
        PasswordAuthentication no
    Or by group:

    Match Group users
        PasswordAuthentication no
    Or, as mentioned in the comment, by negation:

    Match User !root
        PasswordAuthentication no
    1,145 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: