How to read login from a Remote Server

In case you have a remote server which booted in rescue mode and you need to obtain the login history of the original server you just can use the last command after mounting the disc which is carrying the OS from the original server.

last -f changes the default location of the last log to another directory

last -f /mnt/sda1_server/var/log/wtmp

Mysql: Allow Access from an IP Address

In order to enable access from a remote client to a mysql server just perform the following steps:

$ mysql -u root -p
Enter password:

mysql> use mysql

mysql> GRANT ALL ON *.* to root@’192.168.1.4′ IDENTIFIED BY ‘root-pw';

mysql> FLUSH PRIVILEGES

use ” ‘ ” in all four cases above.

Afterwards the remote client should be allowed to communicate the MySQL server you updated the privileges. This receipt usually solves the ERROR:

“Host is not allowed to connect to this MySQL server”

Tipps and Tricks creating a SSL Certificate

In order to create a SSL Certificate one needs a CSR request for the server first. Under Linux it is very easy to create such an request:

openssl req -new -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr

will do the job. Afterwards you have a csr file and a private key in the directory where you executed the command.

If your private key is protected by a password you can remove the password by:

> openssl rsa -in old.key -out new.key

During this process it is necessary to give the password once. The new key will not be protected by a password any more.