Enable Password Authentication and Disable Public Keys in SSH

SSH (Secure Shell) is a secure protocol used for remote server access. By default, SSH uses public key authentication. However, there may be cases where you want to switch to password authentication instead. This tutorial will guide you through the process of disabling public key authentication and enabling password authentication in SSH.

Step 1: Log into SSH
Connect to your server using SSH:

ssh username@server_ip_address

Step 2: Edit SSH configuration
Open the SSH configuration file:

sudo nano /etc/ssh/sshd_config

Step 3: Modify "PasswordAuthentication"
Find the line "PasswordAuthentication" and change "no" to "yes":

PasswordAuthentication yes

Step 4: Save and exit
Save the file and exit the text editor.

Step 5: Restart SSH service
Restart the SSH service for changes to take effect:

sudo service sshd restart

Step 6: Log in with password authentication
Use SSH to log in with your password:

ssh username@server_ip_address

Conclusion:
By following these steps, you have successfully disabled public key authentication and enabled password authentication in SSH. Remember to use strong passwords to ensure the security of your server.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...

How to Secure a cPanel/WHM Web Server

Here are a few basic steps that you should keep in mind for keeping a server secure. 1) Strong...