Open In App

How to Enable and Start SSH on Kali Linux

Last Updated : 23 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Secure Shell (SSH) is a protocol that provides a secure way to access a remote computer. It allows you to remotely log in to a system and execute commands as if you were sitting at the console. In this guide, we will explain how to enable and start SSH on Kali Linux, a popular Linux distribution used for penetration testing and digital forensics.

What is SSH?

SSH, or Secure Shell, is a cryptographic network protocol that allows you to securely communicate with a remote system. It provides a secure way to access and manage remote devices over an unsecured network, such as the internet. SSH encrypts all data transmitted between the client and the server, making it difficult for attackers to intercept or eavesdrop on the communication.

Enabling SSH on Kali Linux

By default, SSH is not enabled on Kali Linux. To enable it, you need to follow these steps:

Step 1: Install the OpenSSH Server

The OpenSSH server package provides the necessary tools to enable SSH on your Kali Linux system. To install it, open a terminal and run the following command:

sudo apt update

spt update in kali linux

Installing openssh-server in kali linux

sudo apt install openssh-server

install openssh-server in kali linux

Step 2: Start the SSH Service

Once the installation is complete, you need to start the SSH service. You can do this by running the following command:

sudo systemctl start ssh

start ssh in kali linux

Step 3: Enable SSH to Start on Boot

To ensure that the SSH service starts automatically every time you boot your system, run the following command:

sudo systemctl enable ssh

enable ssh in kali linux

Step 4: Verify SSH is Running

To verify that the SSH service is running, you can use the following command:

sudo systemctl status ssh

checking status of ssh in kali linux

If SSH is running, you should see an output indicating that the service is active and running.

Step 5: Configure SSH (Optional)

By default, SSH uses port 22 for communication. If you want to change the default port or configure other aspects of the SSH server, you can edit the SSH configuration file located at `/etc/ssh/sshd_config`. Make sure to restart the SSH service after making any changes to the configuration file:

sudo systemctl restart ssh

restart ssh

Connecting to Your Kali Linux System Using SSH

Now that SSH is enabled on your Kali Linux system, you can connect to it from another computer using an SSH client. Here's how you can do it:

Step 1: Find Your Kali Linux System's IP Address

To connect to your Kali Linux system, you need to know its IP address. You can find this information by running the following command in the terminal:

ip a


Look for the IP address assigned to your network interface (usually `eth0` or `wlan0`).

Step 2: Connect to Your Kali Linux System

On another computer, open an SSH client (such as PuTTY on Windows or Terminal on macOS and Linux) and use the following command to connect to your Kali Linux system:

ssh username@ip_address


Replace `username` with your username on the Kali Linux system and `ip_address` with the IP address of your Kali Linux system.

For example, if your username is `kali` and your Kali Linux system's IP address is `192.168.1.10`, you would use the following command:

ssh [email protected]


Step 3: Enter Your Password

When prompted, enter the password for your Kali Linux user account. If this is your first time connecting to the system, you may see a message asking you to confirm the authenticity of the host. Type`yes` to continue.

Step 4: Access Your Kali Linux System

Once you've successfully authenticated, you should be logged in to your Kali Linux system via SSH. You can now execute commands on the remote system as if you were using it directly.

ssh [email protected]


Replace `kali` with your username and `192.168.1.10` with the IP address of your Kali Linux system.

Conclusion

In this guide, we've explained how to enable and start SSH on Kali Linux, as well as how to connect to your Kali Linux system using an SSH client. SSH is a powerful tool that allows you to remotely manage your systems securely. By following these steps, you can easily enable SSH on your Kali Linux system and start using it to remotely access and manage your system.


Article Tags :

Similar Reads