Home > Article > System Tutorial > How to install SSH service on Kali Linux
Our purpose is to install SSH (secure shell) on Kali Linux.
RequireYou need to have privileged access to your Kali Linux installation or Live system.
Difficulty levelIt'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
InstallUse from terminal
apt-get
Command to install SSH package:
# apt-get update # apt-get install sshEnable 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 startAllow 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
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!