Connect to Docker Container via SSH

Using SSH in a docker container is a bad practice and should be avoided. In most cases, it is recommended to use the docker exec command to get a container shell. But in some cases, you need to connect to the docker container remotely via an interactive SSH session.

Continue reading “Connect to Docker Container via SSH”

OpenVPN: Assigning Static IP Addresses to Clients

By default, when connecting, OpenVPN clients receive a dynamic IP from the DHCP range that you set in the OpenVPN server configuration file (server.ovpn) server network netmask (for example, server 10.24.1.0 255.255.255.0). In some cases, you want certain OpenVPN clients to get the same static IP address every time they connect.

Continue reading “OpenVPN: Assigning Static IP Addresses to Clients”

Using Ansible to Change Config Files in Linux

In this example, we’ll look at how to edit Linux configuration files with Ansible using sshd_config as an example. Our Ansible playbook should modify the sshd_config file and change/remove directives with insecure authentication algorithms.

Continue reading “Using Ansible to Change Config Files in Linux”

Joining CentOS/RHEL/Rocky Linux to Active Directory (AD) Domain

In this article, we will show you how to join servers or workstations running CentOS 8, RHEL, or Rocky Linux to an Active Directory domain using realmd, and how to authenticate to a Linux host using an Active Directory account. The Realmd (Realm Discovery) service makes discovering and adding Linux hosts to an AD domain much easier. Realmd uses SSSD (via Kerberos and LDAP) or Winbind to verify and authenticate Active Directory accounts.

Continue reading “Joining CentOS/RHEL/Rocky Linux to Active Directory (AD) Domain”

Extending a Linux Disk Partition Online with Fdisk

In this article, we’ll look at how to extend a disk partition in Linux online without shutting down the system or unmounting the partition. You can use the fdisk tool to delete a partition and create a new larger partition in its place on the fly without losing data. In my case, a Linux VM running on VMware ESXi ran out of space on the ext4 data partition.

Continue reading “Extending a Linux Disk Partition Online with Fdisk”

Installing Docker Engine on Linux (Debian, CentOS)

Docker is one of the most popular software for running containers. With Docker, developers can build, deliver, and run their code in containers. The host where Docker is installed and containers are running is called the Docker Engine. In this article, we’ll walk you through how to install Docker Engine (Community Edition) and Docker Compose on Linux (CentOS, Debian, and Ubuntu).

Continue reading “Installing Docker Engine on Linux (Debian, CentOS)”