How to allow root login from one IP address with ssh public keys only

I am using MacOS on the desktop and Ubuntu Linux on the server. I disabled root login over ssh and enabled ssh based public key login. However, I recently added second Ubuntu server. I need…

How to prevent unprivileged users from viewing dmesg command output on Linux

I want to restrict both normal users and root user inside LXD container “hypervisor” from viewing and using dmesg command output. How do I prevent non-root (unprivileged) Linux users from viewing the Linux kernel’s log…

How to prevent sed -i command overwriting my symlinks on Linux or Unix

I recently ran a command ‘sed -i  s/CONFIG_1/CONFIG_OPT_2/g  /etc/nginx/sites-enabled/*.conf‘ on a Debian Linux server. However, the sed command destroyed the link and created a regular file in place of the link file. How can I…

How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 [ 19/June/2017 ]

A very serious security problem has been found in the Linux kernel called “The Stack Clash.” It can be exploited by attackers to corrupt memory and execute arbitrary code. An attacker could leverage this with…

How to use or specify multiple IP addresses in iptables source or destination on Linux

I need to specific multiple IP address in iptables using Linux script. How do I create a rule that uses multiple source or destination IP addresses ?   You can set multiple source (-s or…

How to add new brick to replicated GlusterFS volume on Linux

I have a three server replicated volume setup (scalable network filesystem for cloud and VMs). I need to add one more server. How do I add a new a new brick to an existing replicated…

How to shutdown / reboot the remote Linux server from the CLI

I am a new Linux sysadmin. How do I remotely shutdown or reboot the server from the CLI?   For stopping and restating the system use any one of the following command: halt command –…

How to install or compile GIMP filters/plugins/extensions on Linux

H ow do I install or compile new GIMP filters on a Ubuntu or Debian or Fedora or CentOS Linux desktop system?   GNU Image Manipulation Program (GIMP) is an open source and advanced picture…

How to import a OpenVPN .ovpn file with Network Manager or Command Line in Linux

I have installed an OpenVPN server on a Debian Linux server. I have a client.ovpn file for my VPN server. How do I use it with Network Manager GUI? Is it possible to install or…

How to install Firefox 57 Quantum on a Linux

M y Linux distro comes with Firefox ESR. I read Firefox 57 is over twice as fast as Firefox from 6 months ago, built on a completely overhauled core engine with brand new technology. How…