Home > System Tutorial > LINUX > body text

How to install SSH service on Kali Linux

WBOY
Release: 2024-01-13 18:57:09
forward
1498 people have browsed it

如何在 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
Copy after login

Command to install SSH package:

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

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

systemctl
Copy after login

Command to enable it:

# systemctl enable ssh
Copy after login

Use SSH in current session execution:

# service ssh start
Copy after login
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.
Copy after login

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
Copy after login

changed to:

PermitRootLogin yes
Copy after login

如何在 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
Copy after login

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!

source:linuxprobe.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!