How to Enable SSH in Kali

To enable SSH in Kali Linux and allow remote connections, follow these simple steps. By default, Kali comes with the OpenSSH server pre-installed, but it is disabled for security reasons.

1. Start and Enable the SSH Service

Open your terminal and run the following commands to start the service and configure it to launch automatically every time you power on your machine:

Linux


# Start the service immediately

sudo systemctl start ssh

# Enable the service to start at boot so you don't have to start it manually every time

sudo systemctl enable ssh

2. Configure the Firewall (Optional)

If you have the ufw firewall enabled on your Kali machine, you must allow traffic through port 22:

Linux

sudo ufw allow ssh

3. How to Connect from Another Box

First, identify the IP address of your Kali machine:

Linux

ip a

(Look for the IP address under the eth0 or wlan0 section).

From another device (Linux/Mac/Windows PowerShell):

Linux

ssh your_kali_user@192.168.1.XX