1. Enable SSH on Linux VMS to allow remote connections
To remotely connect to Linux using Xshell, ensure that openssh-server is installed and enabled, and enter openssh-server in the terminal
yum list installed | grep openssh-server
Copy the code
If no output is displayed, the installation is not complete
Run the following command to install the Openssh-server
yum install openssh-server
Copy the code
Find the SSHD service configuration file sshd_config in /etc/ssh/ and open it with Vim editor
Remove # from file before listener port and listener address:
Then enable allow remote login:
Finally, turn on the use of username and password as connection authentication:
Save the exit
To enable the SSHD service, enter
service sshd start
Copy the code
Query the IP address of the Linux VM
Check whether the VM and host can ping each other. If no, configure the VM network. You can use Xshell on the host to remotely connect to VMS when they ping each other
2. Open Xshell to establish remote connection
1. Create a session in Xshell and write the IP address of the host to Linux.
2. The connection is successful