Send SSH public key to another server

ssh-copy-id -i <id_file> user@machine

Get public IP adress

curl ifconfig.me

Create self-signed certificate

openssl req -x509 -newkey rsa:4096 -keyout foo.key -out foo.crt -days 365

Get total size of a repository

du -sh .

Get total size of subdirectories

du -sh ./* | sort -hr

List the largest file of a repository

du -a /dir/ | sort -n -r | head -n 20

Test if a service port is open

nc -vz <ip_address> <port>

readlink -f <file/folder>