Tag Archives: cent os

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

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 buffer?
Halal Vitamins

Powered by WPeMatico

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

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 to sync file between two using rsync command. Is there any way that I can log from the second server into my first server with root user from second server IP address only ({root@secondBOX }# ssh root@firstBOX1) without reducing OpenSSH server security option?
Halal Vitamins

Powered by WPeMatico

How to install tinc VPN on Ubuntu Linux 16.04 to secure traffic

How to install tinc VPN on Ubuntu Linux 16.04 to secure traffic

I have two VPS running in the cloud. The first one is the database, and another one is the web server. I want to secure traffic that flows between private network which is insecure by design and I do not want to use OpenVPN due to complex settings. How do I install and setup tinc VPN server and secure my traffic over VPN on Ubuntu Linux 16.04 LTS server?
Halal Vitamins

Powered by WPeMatico

How to configure Nginx SSL/TLS passthrough with TCP load balancing

How to configure Nginx SSL/TLS passthrough with TCP load balancing

How do I configure SSL/TLS pass through on Nginx load balancer running on Linux or Unix-like system? How do I load balance TCP traffic and setup SSL Passthrough to pass SSL traffic received at the load balancer onto the backend web servers?
Halal Vitamins

Powered by WPeMatico

Linux security alert: Bug in sudo’s get_process_ttyname() [ CVE-2017-1000367 ]

Linux security alert: Bug in sudo’s get_process_ttyname() [ CVE-2017-1000367 ]
CVE-2017-1000367
There is a serious vulnerability in sudo command that grants root access to anyone with a shell account. It works on SELinux enabled systems such as CentOS/RHEL and others too. A local user with privileges to execute commands via sudo could use this flaw to escalate their privileges to root. Patch your system as soon as possible.
Halal Vitamins

Powered by WPeMatico

How to extract multiple tar ball (*.tar.gz) files in directory on Linux or Unix

How to extract multiple tar ball (*.tar.gz) files in directory on Linux or Unix

I have tried tar -xvf *.tar.gz command, but getting an error that read as:
tar (child): *.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

How can I extract multiple *.tar.gz files in directory using Linux or Unix-shell prompt?
Halal Vitamins

Powered by WPeMatico

How to append text to a file when using sudo command on Linux or Unix

How to append text to a file when using sudo command on Linux or Unix

I am trying to add entry to /etc/hosts file using ‘sudo echo '192.168.1.254 router' >> /etc/hosts‘ but getting an error that read as, -bash: /etc/hosts: Permission denied. How do I insert or append text to a file when running sudo command on Linux or Unix-like system?
Halal Vitamins

Powered by WPeMatico

How to upload ssh public key to as authorized_key using Ansible

How to upload ssh public key to as authorized_key using Ansible

How do I use Ansible to upload ssh public key to as authorized_key to multiple Linux or Unix servers saved in an inventory file?
Halal Vitamins

Powered by WPeMatico