Jak povolit SSH na Almalinuxu
SSH je primární metoda vzdáleného přístupu a správy zapnutá Linuxové systémy. SSH je služba klient-server poskytující zabezpečená a šifrovaná připojení prostřednictvím síťového připojení. Po. instalace AlmaLinux nebo migrace z CentOS do AlmaLinux, bude to pravděpodobně jedna z prvních věcí, které chcete nakonfigurovat.
V této příručce projdeme postupné pokyny k instalaci a konfiguraci SSH AlmaLinux To vám pomůže, zda se chcete pouze připojit ke vzdáleným systémům přes SSH, nebo chcete, aby váš vlastní systém přijímal také příchozí připojení.
V tomto tutoriálu se naučíte :
- Jak nainstalovat SSH
- Jak spustit a zastavit službu SSH
- Jak povolit SSH prostřednictvím systémového brány firewall
| Category | Requirements, Conventions or Software Version Used |
|---|---|
| System | AlmaLinux |
| Software | OpenSSH |
| Other | Privileged access to your Linux system as root or via the sudo command. |
| Conventions | # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
How to enable SSH on AlmaLinux
Follow the step by step instructions below to get SSH installed on your system and use it to initiate remote connections or accept incoming connections.
- Install the appropriate OpenSSH package for your system. The
openssh-serverpackage will need installed if you’d like your computer to accept incoming SSH connections. Otherwise, if you’d just like to initiate outgoing connections with thesshcommand, then you can install theopenssh-clientspackage. Of course, you may also install both.# dnf install openssh-server openssh-clients
- The SSH service can be controlled through systemd. Use the following
systemctlcommands to configure and control the service.To start or stop the SSH server:# systemctl start sshd AND # systemctl stop sshd
To enable (make SSH start automatically at system boot), or disable the SSH server:
# systemctl enable sshd AND # systemctl disable sshd
- Check whether the SSH server is running by using the
systemctl statuscommand.# systemctl status sshd
- Install the appropriate OpenSSH package for your system. The
- Abyste mohli přijímat příchozí připojení, musíte povolit službu prostřednictvím brány firewalld provedením následujících příkazů.
# firewall-cmd --zone = public --permanent --add-service = ssh # firewall-cmd --reload
That’s all there is to it. For an in-depth look at additional configuration of OpenSSH, check out our dedicated guide for co nejlépe využít OpenSSH.
Closing Thoughts
In this guide, we saw how to enable SSH on AlmaLinux. This included installing the OpenSSH client and server packages, and configuring our system to accept incoming connections. SSH is an essential protocol for most Linux systems, as it allows you to open remote terminals to any number of systems, or to manage your own system from over the internet.
Source: https://linuxconfig.org/how-to-enable-ssh-on-almalinux
