TP-Link AC1200 up and running on ubuntu 18.xx

Finally I got from Amazon this fast wifi dongle that’s working also with Ubuntu 18.04. The TP-link AC1200(T4UH) doesn’t come up with plug and play functionality but the driver is very easy to install on Ubuntu and Debian distributions.

The dongle is based on the RealteK RTL8812AU chipset, and luckly this driver it’s already present on the official repository. All you need to do it’s launch this command from you terminal to install it:

sudo apt install rtl8812au-dkms

plug in your device and it should be ready to connect to the WIFI!

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:

ssh-keygen -y
  • 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:

Host myshortname realname.example.com
HostName realname.example.com
IdentityFile ~/.ssh/realname_rsa
User remoteusername

Host myother realname2.example.org
HostName realname2.example.org
IdentityFile ~/.ssh/realname2_rsa
User remoteusername

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:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:shacode.
Please contact your system administrator.
Add correct host key in /Users/username/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/username/.ssh/known_hosts:21
RSA host key for IP_ADDRESS has changed and you have requested strict checking.
Host key verification failed.

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

ssh-keygen -R <hostname or ip_address>

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

Install LAMP ubuntu 16.04

Install and configure LAMP

Install apache2:

sudo apt-get install apache2

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

ServerName IP_ADDRESS

Launch the command:

sudo apache2ctl configtest

you should receive the message Syntax OK.

Restart Apache to implement the changes:

sudo /etc/init.d/apache2 restart

Adjust the Firewall to Allow Web Traffic

sudo ufw app list

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

Install MySQL

sudo apt-get install mysql-server

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

sudo service mysql restart //restart the service
mysql_secure_installation

try the connection to the db with:

mysql -u root -p

Install PHP

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

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

/etc/apache2/mods-enabled/dir.conf

And insert the php index file before:

<IfModule mod_dir.c>
    DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>

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:

passwd root

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

Install networks tool:

apt-get update
apt-get install net-tools
apt-get install openssh-server
apt-get install ufw

To allow connection from terminal enable ssh launch the command:

Install also:

apt-get install sudo
apt-get install vim
apt-get install software-properties-common

sudo service ssh restart