In this example I will use watch to repeat the call of ls -l
watch -n 5 -d ls -l /home/user/
-n = interval in seconds
-d = differences
In this example I will use watch to repeat the call of ls -l
watch -n 5 -d ls -l /home/user/
-n = interval in seconds
-d = differences
The purpose of the package unattended-upgrades is to keep your server current with the latest security updates. Or call it automatic updates. Install and configure unattended-upgrades.
Do this as root user or use sudo:
apt install unattended-upgrades apt-listchanges
Now configure unattended-upgrades:
dpkg-reconfigure -plow unattended-upgrades
That’s it.
Run a command on a group of nodes, using only SSH and pee:
echo "uptime" | pee "ssh host1" "ssh host2" "ssh host3"
How to safe an entire website with wget:
wget --recursive --page-requisites --convert-links www.test.com
Sometimes, for several reasons, it is necessary to renew the ssh keys of a host. Most Linux and Unix distributions create ssh keys during the installation of the OpenSSH server or similar packages. If you want to clone a VM in KVM or a container system these keys should be changed.
do all the steps below as root user or use sudo
rm -v /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
Restart ssh server
systemctl restart sshd
in your local known_hosts file Use the editor of your choice to edit the ./ssh/known_hosts file, or use ssh-keygen to delete the host.
ssh-keygen -R remote-host
That’s it.