Linux.xshell connect to linux virtual machine problem

xshell connect to linux virtual machine problem

Question: When I use xshell to connect to the kali virtual machine, SSH refuses the password and asks to enter it again. I can't connect successfully after continuous input, so I can't use the linux terminal in xshell. Attached drawing:

Insert picture description here

It is today that I officially started learning the Linux operating system. Although I have a little understanding of the Linux operating system before, it is only a little bit. The reason why I use this xshell is because my laptop configuration is not very good, and the virtual machine is turned on and takes up the cost. The machine resources will be very stuck, so using xshell can greatly reduce resource consumption, but I encountered such a problem at the beginning.

Finally, a solution to the problem was concluded by looking up some information.

Enter the command in the kali terminal: service ssh statusCheck whether the SSH service is enabled
Insert picture description here
. Obviously it is not enabled.
How to enable the SSH service?

  1. Enter vim /etc/ssh/sshd_config in
    Insert picture description here
    the terminal to remove the # in front of #PermitRootLogin prohibit-password and change it to PermitRootLogin yes
  2. Remove #PasswordAuthentication yes中#
  3. SSH is still not open at this time, enter service ssh start
  4. At this point, SSH can already be opened. If it is still not available, restart the virtual machine.
    Look at xshell again at this time

Insert picture description here
It is ready to use.

Guess you like

Origin blog.csdn.net/qq_44862120/article/details/114230432