- Как включить SSH в Linux Mint
- Возможно вам будет интересно:
- Как работает SSH
- Как установить сервер Openssh в Linux Mint
- Как разрешить ssh соединение в брандмауэре Linux Mint
- Заключение
- How to Install OpenSSH Server on Linux Mint 21
- How to Install OpenSSH Server on Linux Mint 21
- Step 1: Prerequisites
- Step 2: Update Your Server
- Step 3: Install OpenSSH Server
- Step 4: Verify Installation
- Step 5: Check Status
- Step 6: Enable or Disable
- Step 7: Allow through Firewall
- Step 8: Test Connection
- How to enable SSH on Linux Mint
- How SSH works
- How to install the Openssh server
- How to allow ssh connection in Firewall
- Conclusion
- About the author
- Taimoor Mohsin
- RootUsers
- Guides, tutorials, reviews and news for System Administrators.
- How To Enable SSH in Linux Mint
- Enable SSH in Linux Mint
- Summary
- Share this:
Как включить SSH в Linux Mint
Включение SSH в Linux Mint— это одно из первых действий, которые вы должны сделать после установки операционной системы. Так как SSH предоставляет зашифрованный сетевой протокол для защиты удаленных учетных записей сервера и клиентов. Это позволяет вам удаленно получать доступ к вашей машине и безопасно выполнять операции сервером. SSH шифрует весь трафик между клиентом и сервером, чтобы предотвратить подслушивание, перехват соединений и другие типы атак.
Протокол Secure Shell (SSH) используется для управления или передачи данных между компьютерами через Интернет. Старые методы выполнения этих действий, такие как telnet, не обладают этими возможностями. Они небезопасны, так как передают пароль пользователя в виде открытого текста. А SSH предлагает безопасный маршрут по незащищенной сети, соединяющий клиентскую программу SSH с сервером SSH. В архитектуре клиент-сервер. Протокол Secure Shell в основном используется для связи с Unix-подобными операционными системами, хотя он также может использоваться в Windows.
Возможно вам будет интересно:
Как работает SSH
Клиент SSH по умолчанию позволяет подключаться к рабочим станциям Linux по защищенному каналу, и по умолчанию используется TCP-порт 22. SSH кодирует пакеты, делая невозможным для кого — либо наблюдение за вашей деятельностью. В отличие от telnet который не шифрует пакеты, так же telnet оставляет открытой возможность того, что кто-то прочитает, что вы делаете по SSH. В этой статье мы покажем вам, как включить безопасную оболочку (ssh) в Linux Mint.
Как установить сервер Openssh в Linux Mint
Вы можете установить сервер OpenSSH, открыв терминал и введя там следующую команду.
SSH должен автоматически запускаться при запуске системы и запускаться после установки. Однако вместо того, чтобы просто предполагать, мы перепроверим.
Чтобы проверить, включен ли SSH, и автоматически запуститься при запуске системы, выполните приведенную ниже команду.
Если терминал возвращает «включено» (enabled), SSH должен запускаться сразу после загрузки компьютера. Если он отключен или если статус неактивен, как показано на следующем рисунке:
Исправьте это используя следующую команду:
Теперь вы можете запустить службу SSH, набрав:
Мы также можем использовать «‘systemctl status» для получения краткой сводки всей информации. На приведенном выше изображении мы видим, что служба запущена и работает, а так же другие полезные сведения.
Как разрешить ssh соединение в брандмауэре Linux Mint
Иногда брандмауэр запрещает вам использовать соединение между клиентом и сервером. Итак, чтобы разрешить соединение, вам требуется ввести.
Это добавит правило в ваш брандмауэр, разрешающее подключение по ssh. Так же вы можете включить брандмауэр, если он в настоящее время отключен, введя.
Вам необходимо обновить вновь созданные настройки, чтобы реализовать их.Сделать это просто введите команду.
В приведенной выше команде UFW — это «простой брандмауэр» (uncomplicated firewall), который используется для управления брандмауэром Linux:
Вы также можете проверить состояние и полные сведения о брандмауэре ufw, введя команду.
Заключение
OpenSSH не установлен по умолчанию в Linux Mint, но его легко установить или включить. Это приложение устанавливает безопасное и зашифрованное соединение между сервером и клиентом. Мы продемонстрировали, как быстро настроить и использовать SSH в Linux Mint. После выполнения вышеупомянутого метода SSH будет активен автоматически при загрузке системы.
How to Install OpenSSH Server on Linux Mint 21
In this article, I will take you through the steps to install OpenSSH Server on Linux Mint 21. If you would like to remotely connect your Linux Mint Server then you need to open Port 22 by installing OpenSSH package in your System. OpenSSH Server is a freely and easily available version of the Secure Shell (SSH) protocol family of tools for remotely controlling, or transferring files between computers. It provides a server daemon and client tools to facilitate secure, encrypted remote control and file transfer operations, effectively replacing the legacy tools. More on Ubuntu website. While it can be easily installed on any Linux distributions, here we will see the steps to install on Linux Mint 21 Server.
How to Install OpenSSH Server on Linux Mint 21
Step 1: Prerequisites
a) You should have a running Linux Mint 21 Server.
b) You should have sudo or root access to run privileged commands.
c) You should have apt or apt-get utility available in your Server.
Step 2: Update Your Server
Before going through the steps to install openssh server package on your Server, it is always recommended to first sync your installed packages with the latest available versions from default repo using sudo apt update && sudo apt upgrade command as shown below.
Step 3: Install OpenSSH Server
In the next step, you can install OpenSSH Server from default repo by using sudo apt install openssh-server command as shown below. This will download and install the package along with all its dependencies.
Step 4: Verify Installation
To verify the installed files, you need to use dpkg -L openssh-server command as shown below.
Step 5: Check Status
You can check the ssh status by running systemctl status ssh command as shown below. It should show active and in running state. If needed, you can also start or restart ssh service by using sudo systemctl start ssh or sudo systemctl restart ssh command.
Step 6: Enable or Disable
You can also check the SSH enable status by using systemctl is-enabled ssh command as shown below. In case, if it’s not enabled then you can enable it by running sudo systemctl enable ssh command. Similarly, to disable the service you can use sudo systemctl disable ssh command.
Step 7: Allow through Firewall
In case, you are running ufw firewall in your System then you need to allow SSH Service from the firewall by using sudo ufw allow ssh command as shown below.
Step 8: Test Connection
You can test the openssh connection from another system in the network by running telnet command. Since in our case, Linux Mint Host IP Address is 192.168.0.106 so we will use telnet 192.168.0.106 22 command as shown below.
After successful connection, you will see below displayed message on the command prompt. This confirms that our connection is successful and SSH Port is open on the remote server.
How to enable SSH on Linux Mint
Enabling SSH on Ubuntu is one of the first things you should do after installing the operating system as it provides an encrypted network protocol for safeguarding remote server and client logins. It allows you to access your machine remotely and execute operations securely. It encrypts all client-server traffic to prevent eavesdropping, connection hijacking, and other types of attacks.
Secure Shell (SSH) protocol is used to manage or transmit data between computers through the internet. Old methods for accomplishing these actions, such as telnet do not have these capabilities. They are unsafe since they transmit the user’s password in plaintext. It offers a secure route over an unprotected network, connecting an SSH client program to an SSH server in a client-server architecture. It is mainly used to communicate to Unix-like operating systems, although it may also be used on Windows.
How SSH works
The default SSH client allows you to connect to Linux workstations through a secure channel, and it defaults to TCP port 22. SSH encodes the packets, making it impossible for anyone to observe your activities. Unlike telnet, which does not encrypt the packets, telnet leaves open the possibility of someone reading what you do with the SSH. We are going to show you how to enable secure shell (ssh) on Linux Mint in this article.
How to install the Openssh server
You can install the OpenSSH server by opening a terminal and typing the following command there.
SSH should be automatically set to start on system startup and should be running once installed. However, rather than just assuming, we’ll double-check.
To check that SSH is enabled and to start automatically on system startup, run the below-given command.
If it returns ‘enabled‘ SSH should start up immediately when the computer boots. If it is disabled or if the status is inactive as shown in the following image:
Then use the below-mentioned command to enable it:
Now you start the SSH service by typing:
We may also use ‘systemctl status’ to receive a quick summary of all information; in the above image, we can see that the service is up and running and other helpful details.
How to allow ssh connection in Firewall
Sometimes the firewall restricts you from using the connection between the client and server. So, to allow that you need to type.
This will add the rule on your firewall to allow the ssh connection. Later you can enable the firewall if it is currently disabled by typing.
You need to refresh the newly made settings in order to implement them and you can do that by typing.
In the above command, UFW is an “uncomplicated firewall” that is used to manage a Linux firewall:
You can also check the status and complete details of the ufw firewall by typing.
Conclusion
The SSH protocol is used by OpenSSH, which is a free version of the Secure Shell (SSH) protocol suite that is not installed by default but is necessary to do so to enable it. The reason for this is that it establishes a safe and encrypted interface between the server and the client. We’ve demonstrated how to rapidly set up and utilize SSH in Linux Mint. Upon performing the above mentioned method, the SSH will be activated automatically when the system boots up.
About the author
Taimoor Mohsin
Hi there! I’m an avid writer who loves to help others in finding solutions by writing high-quality content about technology and gaming. In my spare time, I enjoy reading books and watching movies.
RootUsers
Guides, tutorials, reviews and news for System Administrators.
How To Enable SSH in Linux Mint
By default OpenSSH server is not installed in Linux Mint. This quick guide will show you how to install and enable SSH in Linux Mint, allowing you to remotely access the operating system over the network through SSH.
Enable SSH in Linux Mint
- Open Terminal
We’ll be doing this through command line, so begin by first opening up a terminal. You can find the terminal icon in the task bar in a default GUI installation, as shown below. - Install OpenSSH Server
Within the terminal, run the following command as root to install the OpenSSH server package.
apt-get install openssh-server -y
Note: You must do this with root privileges, otherwise you will receive the following error message:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
We can then use ‘systemctl is-active’ as shown below to check that ssh is currently active and running. If it comes back with ‘active’ then SSH is currently running. If it’s not running, you can run ‘systemctl start ssh’ to start it up.
We can also use ‘systemctl status’ to get a quick overview of all information, in the example below we can see that it’s actively running as well as various useful information about the service.
Testing SSH Access
In this example we have confirmed that SSH is configured to start up on system boot automatically and is currently running, so let’s try and SSH to it from an external Windows system! We’ll do this using PuTTY. You can display the IP address of the Linux Mint machine by running ‘ip a’ from the terminal.
[email protected] ~ $ ip a 2: ens33: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0c:29:d3:f5:b0 brd ff:ff:ff:ff:ff:ff inet 192.168.1.20/24 brd 192.168.1.255 scope global dynamic ens33 valid_lft 83316sec preferred_lft 83316sec inet6 fe80::3286:aa53:7220:5fa7/64 scope link valid_lft forever preferred_lft forever
We can see here that the IP address of our Linux Mint system is 192.168.1.20, so we’ll SSH to this using PuTTY from Windows. All you need to do is specify your username and password. Note that by default the user ‘root’ will not have SSH access. This behaviour can be modified by editing the PermitRootLogin value in the ‘/etc/ssh/sshd_config’ file and then restarting SSH. That’s all there is too it! We have now successfully established an SSH connection from Windows to Linux Mint, allowing us to remotely administer the Linux system over the network by running various commands via SSH.
Summary
By default Linux Mint does not have OpenSSH server installed. We have shown you how to quickly install and enable SSH in Linux Mint. Once installed we checked that it was configured to automatically start up on system boot and that it was running. Finally we connected to Linux Mint via SSH with PuTTY from a Windows computer.