Home  >  Article  >  System Tutorial  >  How to install SSH service on Kali Linux

How to install SSH service on Kali Linux

WBOY
WBOYforward
2024-01-13 18:57:091535browse

如何在 Kali Linux 上安装 SSH 服务

Purpose

Our purpose is to install SSH (secure shell) on Kali Linux.

Require

You need to have privileged access to your Kali Linux installation or Live system.

Difficulty level

It's easy!

Routine

# - The given command needs to be run with root user privileges or using sudocommand

$ - The given command is run as a user with regular permissions

Install

Use from terminal

apt-get

Command to install SSH package:

# apt-get update
# apt-get install ssh
Enable and start using SSH

To ensure that the secure shell can be used, use it after restarting the system

systemctl

Command to enable it:

# systemctl enable ssh

Use SSH in current session execution:

# service ssh start
Allow SSH Root access

By default, SSH does not allow logging in as the root user, so the following error message will appear:

Permission denied, please try again.

In order to SSH into your Kali Linux system, you have two different options. The first option is to create a new unprivileged user and log in using its identity. As a second option, you can access SSH as the root user. In order to achieve this, you need to insert or edit the following lines in the SSH configuration file /etc/ssh/sshd_config:

Will

#PermitRootLogin prohibit-password

changed to:

PermitRootLogin yes

如何在 Kali Linux 上安装 SSH 服务

After making changes to /etc/ssh/sshd_config, you need to restart the SSH service before logging in to SSH as the root user:

# service ssh restart

The above is the detailed content of How to install SSH service on Kali Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:linuxprobe.com. If there is any infringement, please contact admin@php.cn delete

Related articles

See more