ERPcaLL Flash Deal
offer

How to enable SSH Password Authentication for cloud server

How to Enable SSH Password Authentication for any cloud server, Several way of connecting server with several way like through SSH or via pem file. We can also connect with putty to our server. How to enable ssh password login for cloud server.

Amazon AWS EC2

Some server companies, like who are providing cloud server such as Amazon EC2 and Google Compute Engine, disable SSH password authentication by default. That is, you can only log in over SSH using public key authentication. In Amazon AWS EC2 we can easily generate pem file and ppk file.Via PPK file we can easily login with putty, Otherwise through PEM file we can connect through terminal.

SFTP is a protocol that runs over SSH, so this means SFTP using passwords will not work by default when SSH password authentication is disabled.

To enable SSH password authentication, you must SSH in as root to edit this file:

/etc/ssh/sshd_config

Then, change the line

PasswordAuthentication no

to

PasswordAuthentication yes

After making that change, restart the SSH service by running the following command as root:

sudo service ssh restart

Enable Logging In as root: SSH Password Authentication for cloud server

Some providers also disable the ability to SSH in directly as root. In those cases, they created a different user for you that has sudo privileges (often named ubuntu). With that user, you can get a root shell by running the command:

sudo -i

If you instead want to be able to directly SSH in as root, again edit this file:

/etc/ssh/sshd_config

And change the line

PermitRootLogin no

to

PermitRootLogin yes

After making that change, restart the SSH service by running the following command as root:

sudo service ssh restart

If you enable this setting, don’t forget to set a strong password for root by running the command.

sudo passwd root

Leave a Reply

Your email address will not be published. Required fields are marked *