Check your ssh key passphrase

How can we check the passphrase of a private key?

Is it possible to do that using the following command:

  • If the input is the correct passphrase, it will show you the associated public key.
  • the wrong passphrase, it will display load failed.
  • If the key has no passphrase, it will not prompt you for a passphrase and will immediately show you the associated public key.

How to use multiple SSH private keys on a client

To use multiple shh private keys on a client you need to create the file config inside the folder .ssh and use the following entries:

where IdentityFile is the private key for realname.

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

When you try to connect to a remote server via ssh and you receive the message:

you can reset the known_host for the ip_address with the command:

the -R hostname Removes all keys belonging to hostname from a known_hosts file.

Install WordPress updates without ftp

If you have wordpress in a local machine and you want update the wordpress version without enable ftp you can add to the wordpress config file wp-config.php this setting:

remember you need to have permission to write in the wordpress folder. If you have a LAMP server make sure you have the user set to www-data.

sass installation on Mac – Gem::FilePermissionError

If you receive the following error during sass installation:

try to use this command:

Install LAMP ubuntu 16.04

Install and configure LAMP

Install apache2:

Set Global ServerName to Suppress Syntax Warnings. Append in /etc/apache2/apache2.conf (bottom of the file):

Launch the command:

you should receive the message Syntax OK.

Restart Apache to implement the changes:

Adjust the Firewall to Allow Web Traffic

http://your_server_IP_address to see the welcome page from apache.

Install MySQL

Set a secure password for the root user and launch the script to remove some dangerous defaults and lock down access to our database system

try the connection to the db with:

Install PHP

Modify the way that Apache serves files when a directory is requested serving php file before instead of html edit the file:

And insert the php index file before:

restart apache: sudo /etc/init.d/apache2 restart

test php with a phpinfo page.

Resources:

Docker ubuntu 16.0.4 on QNAP Container

Create and setup the container

Change the root password:

to know the ip address we need to launch the command ifconfig but is not installed by default.

Install networks tool:

To allow connection from terminal enable ssh launch the command:

Install also:

sudo service ssh restart

WordPress: Is its parent directory writable by the server? [Ubuntu]

The webserver (Apache) runs as user www-data and group www-data by default on Ubuntu so you need to give the permission to the file/folder are not owned by this user.

To make www-data the owner which makes it writeable:

Ubuntu dist-upgrade

After the system updates if you still have:

Use the following commands to install all the packages