На примере Cloud.ru VPS singularity2.lytkins.ru

1. Создать пару ключей ssh

ssh-keygen

задать passhprase, сохранить passhprase в менеджере паролей

Пара ключей: id_ed25519 - приватный ключ, id_ed25519.pub - публичный ключ

2. Создать VPS (https://cloud.ru), указать пользователя liv_adm, прописать содержимое публичного ключа из файла id_ed25519.pub

3. Добавить на внешнем DNS-сервере A-запись

singularity2 A 91.224.87.184

4. Проверить разрешение имени в ip-адрес

PS C:\> nslookup singularity2.lytkins.ru
╤хЁтхЁ:  safe.dns.yandex.ru
Address:  77.88.8.88

Не заслуживающий доверия ответ:
╚ь :     singularity2.lytkins.ru
Address:  91.224.87.184

5. Настроить оболочку на bash

chsh -s /bin/bash

6. В программе MobaXTerm создать новую сессию 

выбрать квадрат SSH

Remote host = singularity2.lytkins.ru

Username liv_adm

Выбрать страницу Advanced SSH settings

включить галку Use private key, указать место расположения файла id_ed25519 на машине админа (например  %USERPROFILE%\.ssh\id_ed25519)

7. Установить пакет lnav (ncurses-based log file viewer)

sudo apt install lnav

8. Настроить fail2ban

sudo apt install fail2ban

проверить состояние сервиса

liv_adm@singularity2:~$ sudo systemctl status fail2ban
● fail2ban.service - Fail2Ban Service
     Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; preset: enabled)
     Active: active (running) since Fri 2026-06-19 02:24:31 MSK; 1min 11s ago
       Docs: man:fail2ban(1)
   Main PID: 10753 (fail2ban-server)
      Tasks: 5 (limit: 4600)
     Memory: 26.1M (peak: 28.2M)
        CPU: 395ms
     CGroup: /system.slice/fail2ban.service
             └─10753 /usr/bin/python3 /usr/bin/fail2ban-server -xf start

Jun 19 02:24:31 singularity2 systemd[1]: Started fail2ban.service - Fail2Ban Service.
Jun 19 02:24:31 singularity2 fail2ban-server[10753]: 2026-06-19 02:24:31,990 fail2ban.configreader   [10753]: WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto'
Jun 19 02:24:32 singularity2 fail2ban-server[10753]: Server ready

Машина готова к работе!

Дополнительно

  1. Подключить в личном кабинете на сайте https://ubuntu.com VPS в программу Ubuntu Pro
liv_adm@singularity2:~$ sudo pro attach C12tNeBZXcUKzUzyqjBGS2qxuogY3g
[sudo] password for liv_adm:
Enabling Ubuntu Pro: ESM Apps
Ubuntu Pro: ESM Apps enabled
Enabling Ubuntu Pro: ESM Infra
Ubuntu Pro: ESM Infra enabled
Enabling Livepatch
Livepatch enabled
This machine is now attached to 'Ubuntu Pro - free personal subscription'

SERVICE          ENTITLED  STATUS       DESCRIPTION
anbox-cloud      yes       disabled     Scalable Android in the cloud
esm-apps         yes       enabled      Expanded Security Maintenance for Applications
esm-infra        yes       enabled      Expanded Security Maintenance for Infrastructure
fips-updates     yes       disabled     FIPS compliant crypto packages with stable security updates
landscape        yes       disabled     Management and administration tool for Ubuntu
livepatch        yes       enabled      Canonical Livepatch service
realtime-kernel* yes       disabled     Ubuntu kernel with PREEMPT_RT patches integrated
usg              yes       disabled     Security compliance and audit tools

 * Service has variants

NOTICES
Operation in progress: pro attach

For a list of all Ubuntu Pro services and variants, run 'pro status --all'
Enable services with: pro enable <service>

     Account: Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в браузере должен быть включен Javascript.
Subscription: Ubuntu Pro - free personal subscription

2. Установить Docker

Добавить комментарий