Requirements

Privileged access to your Kali Linux installation or Live system is required.

Conventions

# - requires given Linux commands to be executed with root privileges either directly as a root user or by use of the sudo command

$ - requires given Linux commands to be executed as a regular non-privileged user

Steps:

Install SSH

From the terminal, use apt-get command to install SSH packages:

# apt-get update
# apt-get install ssh

 

Enable and Start SSH

To make sure that the secure shell starts after reboot, use systemctl command to enable it:

# systemctl enable ssh

 

To start SSH for a current session, execute:

# service ssh start

 

Allow SSH Root Access

By default, SSH would not allow you to SSH login as the root user, thus the following error message will appear:

Permission denied, please try again.

 

You have two options in order to be able to SSH into your Kali Linux. The first option is to create a new non-privileged user and use its credentials to log in. Second, allow the root user to access the secure shell. To do so, either edit or insert the following line within the /etc/ssh/sshd_config SSH config file:

FROM:
#PermitRootLogin prohibit-password
TO:
PermitRootLogin yes

 

After you have made the above change of the /etc/ssh/sshd_config, restart the ssh service before you attempt SSH login as a root user:

# service ssh restart

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)