How do I use Xshell to remotely connect to a virtual machine?

The steps to remotely connect to a virtual machine using Xshell are as follows:

  1. Open the Xshell software, click on the “File” menu, select “New”, and the New Session dialog box will pop up.
  2. Fill in the following information in the conversation dialog box.
  1. Session name: Create a custom session name to distinguish between different connections.
  2. Host: Input the IP address or hostname of the virtual machine.
  3. Port: the port number for the virtual machine input, default is 22.
  4. Username: Enter the username to log into the virtual machine.
  5. Authentication method: Choose the appropriate method of authentication, such as password authentication or public key authentication.
  6. Password: If password authentication is chosen, enter the password of the virtual machine user.
  1. Clicking on the “OK” button will complete the session configuration.
  2. In the main interface of Xshell, double-click on the name of the newly created session to start connecting to the virtual machine.
  3. If the connection is successful, a new window will appear displaying the command-line interface of the virtual machine.

Please take note of the following:

  1. Ensure that the virtual machine is turned on and in running state.
  2. To verify that the network configuration of the virtual machine is correct, you can use the ping command to test the connectivity of the virtual machine.
  3. Make sure that Xshell software is correctly installed and that the network is functioning properly.
  4. When using public key authentication, it is necessary to add the public key to the authorized_keys file of the virtual machine user in advance.
bannerAds