Monthly Archive: September 2019

Enable SSH password authentication on AWS with CentOS 7

Problem: Want to login to CentOS 7 via username and password only, remove private key login.

Solution: First of all, follow this video instruction if you haven’t built the Amazon EC2 or able to connect server via private key yet.

Then inside the server terminal command line, edit /etc/ssh/sshd_config

Edit the line “PasswordAuthentication no” to (or if you can’t find the line, just add) “PasswordAuthentication yes

restart SSH service

systemctl restart sshd.service

Don’t forget to change the password for user. For the current user,

passwd

for root,

sudo passwd

Can not uninstall MySql completely in CentOS 7

Problem: Want to download MariaDB via yum, but There have conflicts between MariaDB and MySql.

This a problem because these two RDBMS use the same port, simply just use one of them.

Solution: Completely uninstall MySql

First using

 yum list installed | grep mysql

to find out all packages that contain “mysql”

then remove one by one, below commend is to remove the first one(you can keep php-mysqlnd.x86_64 because it is PHP package)

sudo yum remvoe mysql-community-client.x86_64 -y

Then clean MySQL files inside /var/lib/mysql/ and /etc/

sudo rm -r /var/lib/mysql/*
sudo rm -rf /etc/my.cnf

Finally, install MariaDB

sudo yum install MariaDB-server MariaDB-client -y

Close Bitnami banner
Bitnami