(echo >/dev/tcp/{host}/{port}) &>/dev/null && echo "open" || echo "close"
Example:
$ (echo >/dev/tcp/localhost/80) &>/dev/null && echo "open" || echo "close"
curl -Lv http://localhost:5006/v2/
$ sudo apt-get update
$ sudo apt-get install nginx
# adduser username
# usermod -aG sudo username
# userdel username
Remove home directory
# userdel -r username
Generate a passphraseless SSH key and push it to server
$ ssh-keygen -t rsa -b 2048
Generating public/private rsa key pair.
Enter file in which to save the key (/home/username/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/username/.ssh/id_rsa.
Your public key has been saved in /home/username/.ssh/id_rsa.pub.
$ ssh-copy-id id@server
NAME=VALUE
For al process
export NAME=VALUE
Editar
sudo crontab -e -u usuario
Recargar
sudo service cron reload