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:
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 status
Check whether the SSH service is enabled
. Obviously it is not enabled.
How to enable the SSH service?
- Enter vim /etc/ssh/sshd_config in
the terminal to remove the # in front of #PermitRootLogin prohibit-password and change it to PermitRootLogin yes - Remove #PasswordAuthentication yes中#
- SSH is still not open at this time, enter service ssh start
- 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
It is ready to use.