How to manually open port 22 in Kali

tags: kali  linux  kali linux

First use netstat -lnt to check the current open ports of Kali. If port 22 is not open, we need to manually open port 22.

netstat -lnt

The first step: open kail remote ssh, open method is as follows:

1. Configure SSH parameters

Modify the sshd_config file, the command is: vim /etc/ssh/sshd_config

Note: Press i to start editing

Remove the comment of #PasswordAuthentication no, and change NO to YES //The default in Kali is yes

before fixing

After modification

Change PermitRootLogin without-password to PermitRootLogin yes

before fixing

After modification

Then, after pressing the esc key, enter: wq to save and exit vim

Step 2: Start the SSH service

The command is: /etc/init.d/ssh start

Or service ssh start

Check whether the SSH service status is running normally, the command is:

/etc/init.d/ssh status

or

service ssh status

Running indicates successful startup.

Step 3: Set the system to automatically start the SSH service

update-rc.d ssh enable //The system automatically starts the SSH service

update-rc.d ssh disabled // Close the system and automatically start the SSH service

Execute the netstat -lnt command again and see that port 22 is successfully started



 

Intelligent Recommendation

Ubuntu cannot SSH connection, open port 22

After installing the Ubuntu virtual machine in the VM, we often need to use Xshell and other tools to connect remotely, but there will be problems that we cannot connect because the SSH service is tur...

How to check if a port is open

Sometimes we need to determine if a port is open or not. There are two ways. Method 1: The easiest way to see if a port is open Check whether the port is open or not, you need to use the command in do...

How to open the port Linux

Reset address: Example: The solution to the open 10000 port is as follows: 1. Modify the / etc / sysconfig / iptables file, increase the following line: -A RH-Firewall-1-INPUT -m state –state NE...

Linux how open port

First, see which ports are opened NetStat-Anp Second, close the port number:   Third, open the port number:   Fourth, save the settings   5. The following is how the Linux opens the por...

More Recommendation

How to open the server port?

Steps to open the port: Check if the firewall is open Open port number Update firewall rules (must) systemctl-firewallOrder: 1. Check the status of the firewall 2. Turn on the firewall: 3. Turn off th...

How to manually close the port on a personal computer

In the past few days, the Internet has been very unstable. The ransomware WannaCry uses Windows operating system vulnerabilities to attack. Because of the rapid and violent chain reaction, it spreads ...

How to manually vnc port and modify the resolution

How to manually vnc port and modify the resolution 1. Normal Kill port process and modification resolution process On the new port, the SU requires the user name of the Kill VNC and input the password...

【kali】kali manually configure DNS

How to configure dns manually in kali There was a problem when updating the software source today. The progress was stuck. I suspected that there was a problem with DNS. As expected, there was no resp...

How to open remote connection in Kali system

1. Modify the SSH configuration file 1) First back up the configuration file for restoration after operation failure. The command is: cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak 2) Modify the ssh...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top