<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yaroslav Tsvirkun on Medium]]></title>
        <description><![CDATA[Stories by Yaroslav Tsvirkun on Medium]]></description>
        <link>https://medium.com/@yaroslav-tsvirkun?source=rss-2e3a1e7b057c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*w5woF4hNWiJIm0i0DIhApw.jpeg</url>
            <title>Stories by Yaroslav Tsvirkun on Medium</title>
            <link>https://medium.com/@yaroslav-tsvirkun?source=rss-2e3a1e7b057c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:25:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yaroslav-tsvirkun/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to install Docker Engine and Docker Compose on Ubuntu Server 22.04 LTS]]></title>
            <link>https://yaroslav-tsvirkun.medium.com/how-to-install-docker-engine-and-docker-compose-on-ubuntu-server-22-04-lts-f63e9e2ba9b4?source=rss-2e3a1e7b057c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f63e9e2ba9b4</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[powershell]]></category>
            <dc:creator><![CDATA[Yaroslav Tsvirkun]]></dc:creator>
            <pubDate>Wed, 13 Mar 2024 13:51:06 GMT</pubDate>
            <atom:updated>2024-03-13T13:51:06.401Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is for those looking for a detailed and easy-to-understand guide to installing Docker Engine and Docker Compose on Ubuntu Server.</p><p>Docker — is a free, open-source tool for application containerization. Containers are isolated environments similar to virtual machines (VMs). However, compared to VMs, they allow easy application transfer between Docker and virtualization at the OS level, thanks to the tools embedded in the Linux kernel.</p><p>In this article, we will walk through installing Docker on Ubuntu 22.04 LTS. The manual is also suitable for older versions of Ubuntu. In addition, to be comfortable working with many containers, we download Docker Compose, which is required for the centralized management of containers.</p><h3>System Requirements</h3><p>According to the <a href="https://docs.docker.com/engine/install/ubuntu/">Docker documentation</a>, to install it, you will need a 64-bit Ubuntu operating system of one of the following versions:</p><ol><li>22.04 — code name Jammy;</li><li>21.10 — code name Impish;</li><li>20.04 — code name Focal;</li><li>18.04 — code name Bionic.</li></ol><p>Docker works on the most popular architectures. Your device&#39;s resource requirements are determined by how you plan to use Docker and how comfortable you are with it. It all depends on the scale of the applications you plan to deploy inside the containers. Some sources recommend focusing on 2 GB of RAM.</p><p>And, of course, you will need a stable connection to the Internet.</p><h3>How to install Docker on Ubuntu 22.04 LTS</h3><p>Installing Docker on Ubuntu 22.04 LTS involves a list of commands in the terminal. Below is a step-by-step guide with explanations for the actions being performed. The algorithm is also suitable for server versions of Ubuntu.</p><p>Additionally, OpenSSH must be installed on the server, and 22 ports must be open to connect to the server via SSH.</p><p>To install OpenSSH on the server, you can use the command:</p><pre>sudo apt install openssh-server</pre><p>Якщо ви плануєте підключитися до сервера за допомогою операційної системи Windows, можете скористатися <a href="https://www.putty.org/">PuTTY</a> або <a href="https://mobaxterm.mobatek.net/">MobaXterm</a>. Я використовую PowerShell та OpenSSH Client.</p><p>If you plan to connect to the server using a Windows operating system, you can use <a href="https://www.putty.org/">PuTTY</a> or <a href="https://mobaxterm.mobatek.net/">MobaXterm</a>. I use <a href="https://learn.microsoft.com/ru-ru/powershell/">PowerShell </a>and <a href="https://learn.microsoft.com/ru-ru/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui">OpenSSH Client</a>.</p><p><strong>1. Update apt package indexes.</strong></p><p>Unfortunately, the standard repository does not always contain the latest software releases. Therefore, in this tutorial, we will download Docker from its official repository to install the latest release. First, we need to update the package indexes:</p><pre>sudo apt update</pre><p><strong>2. We install additional packages.</strong></p><p>To install docker, you need to download four packages, namely additionally:</p><ol><li>curl — necessary for working with web resources;</li><li>software-properties-common — a package for managing software using scripts;</li><li>ca-certificates — contains information about certification centers;</li><li>apt-transport-https — required for HTTPS data transfer.</li></ol><p>Download them:</p><pre>sudo apt install curl software-properties-common ca-certificates apt-transport-https -y</pre><p>The -y flag means that all terminal questions will be answered with “Yes”.</p><p><strong>3. Import the GPG key.</strong></p><p>The GPG key is required for signature verification. The docker repository will need to be added to the local list. Import the GPG key:</p><pre>wget -O- https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor | sudo tee /etc/apt/keyrings/docker.gpg &gt; /dev/null</pre><p>During the import, the terminal may display a warning, after which it will report the successful execution of the command.</p><p><strong>4. We add the docker repository.</strong></p><p>Let’s add a repository for our version of Ubuntu called Jammy. For other OS versions, you must use their codenames listed in the System Requirements section. Execute the command:</p><pre>echo &quot;deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable&quot;| sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null</pre><p>During execution, the terminal will ask to confirm the execution of the operation. Press Enter.</p><p><strong>5. We update the package indexes again.</strong></p><p>After all the manipulations, we need to update the package indexes once again using the already familiar command:</p><pre>sudo apt update</pre><p><strong>6. We check the repository.</strong></p><p>We ensure the installation will be carried out from the repository we need. Execute the command:</p><pre>apt-cache policy docker-ce</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/0*Ku6Qf3Uc2h8kJbOr.png" /></figure><p>The output may look different depending on the release of new versions of Docker. The main thing is to ensure the installation is done from the Docker repository.</p><p><strong>7. We install Docker.</strong></p><p>After performing all the manipulations with the repositories, you can proceed directly to the installation:</p><pre>sudo apt install docker-ce -y</pre><p>After running the command, the docker installation will start.</p><p>We make sure of the success of the installation by checking the status of the Docker in the system:</p><pre>sudo systemctl status docker</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TNvISUEhY1lxB9kt.png" /></figure><p>As you can see, everything is fine: the docker service has the status Active (Running).</p><h3>Ubuntu 22.04 — Installing Docker Compose</h3><p>Docker Compose — is a docker tool designed to manage a large number of containers. It is used in projects that use many containers that need to work together as a single entity. Manually managing this process is difficult. The entire management process is described within a single YAML file: it contains the settings and configuration of all containers and their applications.</p><p>There are several ways to install Docker Compose. We’ll look at two ways to ensure you’re on the latest version: manual installation and installation using the git version control system.</p><h3>Installation using git</h3><p>First of all, you need to install the git system itself:</p><pre>sudo apt-get install git</pre><p>We make sure that the installation was successful by checking the git version:</p><pre>git --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/0*e2tOgqPBRdaghbos.png" /></figure><p>To clone the repository, go to the Docker Compose page on GitHub and copy the link highlighted in the image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FduxTsPvblx3E4EU.png" /></figure><p>We will use it as a parameter for the git clone command:</p><pre>git clone https://github.com/docker/compose.git</pre><p>After executing the command, the repository will be cloned from Github.</p><h3>Manual installation</h3><p>We return to the <a href="https://github.com/docker/compose/releases">repository on GitHub</a> and find the version number of the latest release (Latest). At the time of the experiments, it was version 2.24.6, and at the time of publication, it was already 2.24.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JV5FO0fZFl9UndY2.png" /></figure><p>At the time of writing, the latest version of Docker Compose is for installation on Ubuntu 22.04 — v2.24.6. Let’s download it:</p><pre>sudo curl -L &quot;https://github.com/docker/compose/releases/download/v2.24.6/docker-compose-$(uname-s)-$(uname -m)&quot; -o /usr/local/bin/docker-compose</pre><p>The command automatically considers the system&#39;s characteristics and architecture using the parameters $(uname-s) and $(uname-m). After the download is complete, change the access rights of the downloaded file:</p><pre>sudo chmod +x /usr/local/bin/docker-compose</pre><h3>Installation using apt-get</h3><p>If downloading the latest version is not essential, you can download it from the Ubuntu repository. To do this, execute the following command:</p><pre>sudo apt-get install docker-compose</pre><h3>Conclusion</h3><p>In this article, we have covered the installation of Docker on Ubuntu 22.04 LTS, and several ways to install Docker Compose. For your experiments and practical activities, you can rent a cloud server, for example on AWS, I did all the experiments in it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f63e9e2ba9b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to fix: Connection refused by port 22 Debian/Ubuntu]]></title>
            <link>https://yaroslav-tsvirkun.medium.com/how-to-fix-connection-refused-by-port-22-debian-ubuntu-dc9949778688?source=rss-2e3a1e7b057c------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc9949778688</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[ubuntu-desktop]]></category>
            <category><![CDATA[ubuntu-server]]></category>
            <dc:creator><![CDATA[Yaroslav Tsvirkun]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 14:17:39 GMT</pubDate>
            <atom:updated>2024-03-11T14:17:39.999Z</atom:updated>
            <content:encoded><![CDATA[<p>SSH provides a secure way to access and manage Linux servers. When connecting to SSH servers, users often encounter a “Connection refused” error on port 22. This can happen for several reasons, such as the SSH service being down, the port being blocked by a firewall, or the server using a different port. It can also happen due to an IP conflict issue. In this article, we will discuss some solutions that you should try to fix the error.</p><p>Note. The commands discussed here have been tested on Ubuntu 22.04 LTS. The same commands are also valid for a Debian system.<br>Fix the “Connection refused” error.</p><p>This is the “Connection refused” error you may encounter when connecting to a remote system via SSH.</p><pre>ssh: connect to host fdaa:bbcc:ddee::1 port 22: Unknown error</pre><p>Follow the step-by-step solutions below to resolve the “Connection Denied” error.</p><h3>Make sure OpenSSH is installed</h3><p>One of the reasons why you might get a “Connection refused” error is that the OpenSSH server is not installed on the target server.</p><p>First, you’ll need to make sure an OpenSSH server is installed on the system you’re trying to access via SSH. To check if OpenSSH is installed, run the following command in the terminal of the target server:</p><pre>sudo apt list --installed | grep openssh-server</pre><p>This command filters the term “openssh-server” from the list of installed packages. If you get a similar result, it means that the OpenSSH server is installed. On the other hand, if you don’t get any output, it means that OpenSSH is missing on the target server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/0*iMdtF0uD0tf8AKSF.png" /></figure><p>If it is not installed on the target server, you can install it using a command like sudo:</p><pre>sudo apt install openssh-server</pre><p>Then enter the sudo password and press “y” when prompted for confirmation. Once installed, confirm it using the same command</p><pre>sudo apt list --installed | grep openssh-server</pre><h3>Check the SSH service</h3><p>The OpenSSH service runs in the background and listens for incoming connections. Stopping the OpenSSH service could be one of the reasons why you are getting the “Connection refused” error message.</p><p>Therefore, it is necessary to check whether the OpenSSH service is running, using the following command in the terminal:</p><pre>sudo service ssh status</pre><p>If you see the following output, it means that the service is active and running in the background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/0*pcQ1mFa5w5aG6v3H.png" /></figure><p>On the other hand, if you get inactive (dead), that means the service is down. You can start the OpenSSH service using a command like sudo in the terminal:</p><pre>sudo service ssh start</pre><p>To restart the service, use the following command:</p><pre>sudo service ssh restart</pre><h3>Check the listening port of the SSH server</h3><p>Another reason for receiving a “Connection refused” error is that you are trying to connect to the wrong port. For example, if the server is configured to listen on port 2244 and you try to connect to the default port 22, then you will receive a “Connection refused” error message.</p><p>Before trying to connect, you need to check the listening port of the SSH server. If it’s a standard port (22), you can connect it with the following command:</p><pre>ssh [username]@[remoteserver IP or hostname]</pre><p>If it’s some port other than the default port, you’ll need to connect to the SSH server using that port:</p><pre>ssh -p [port_number] [username]@[ip_address]</pre><p>To check which port the OpenSSH server is listening on; use the following command in the terminal:</p><pre>sudo netstat -ltnp | grep sshd</pre><p>You will get the following result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/0*UdfbmGNgg18rj3ls.png" /></figure><p>In the third column, you can see the server’s listening port is 2244. If that’s the case, you’ll need to SSH into the server using that port.</p><pre>ssh -p [2244] [username]@[ip_address]</pre><h3>Allow SSH in the firewall</h3><p>A firewall blocking the SSH port can be another major cause of the “Connection Denied” error. If your SSH server is running a firewall, you will need to allow the SSH port on it using the following command. Replace port with the port number that the SSH server is listening on:</p><pre>sudo ufw allow port /tcp</pre><p>For example, if the SSH server is listening on port 2244, you can allow this in the firewall like:</p><pre>sudo ufw allow 2244/tcp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*KaEI-n38JfEVyAJC.png" /></figure><p>Restart the firewall with the following command:</p><pre>sudo ufw reload</pre><p>To verify that the rules have been added, check the firewall status using the following command in the terminal:</p><pre>sudo ufw status</pre><p>The results below show that port 2244 is allowed in the firewall.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/0*dbrzPthFi2ThDunL.png" /></figure><h3>Resolve duplicate IP address conflict</h3><p>The “Connection refused” error can also occur due to conflicting duplicate IP addresses. So, make sure that the system does not have a duplicate IP address.</p><p>Install the “arping” utility on your system using the following command:</p><pre>sudo apt install arping</pre><p>Then check the IP address of the SSH server.</p><pre>ping &lt;ip-address&gt;</pre><p>In the output, if you see a response from multiple MAC addresses, it means that a duplicate IP address is running on the system. If so, change the SSH server IP address and try to connect again with the new IP address.</p><p>Here’s how to fix the “Connection refused” error over port 22 on Linux systems. In this article, we have described several methods that will surely help you in solving the “Connection Denied” error.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc9949778688" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>