Access a Virtual Machine
Last updated
Last updated
After creating virtual machine instances, you need to remote control and manage them. Several remote access methods are listed below.
RDP (Remote Desktop Protocol) RDP is a remote desktop protocol commonly used for remote management of Windows operating systems. You're recommended to remote connect to a Windows virtual machine via RDP.
SSH (Secure Shell) SSH is a command-line based remote management tool that uses a secure network protocol. SSH is widely used in UNIX-like operating systems, including Linux, BSD, and macOS. You're recommended to use Terminal or Windows PowerShell to establish an SSH connection to non-Windows virtual machines.
RFB (Remote FrameBuffer) RFB is a protocol used for graphical remote management. VNC (Virtual Network Computing) is a common remote graphical management tool based on the RFB protocol used in UNIX-like operating systems. VNC login provides a graphical desktop environment, allowing you to interact with the virtual machine visually. VNC protocol is also widely supported across multiple operating systems and platforms, which is more flexible and compatible. You're recommended to remotely access and control the graphical interface of your virtual machines via VNC.
These protocols and tools offer various ways to remotely access and manage virtual machines. RDP provides a graphical interface for Windows virtual machines; SSH offers a command-line interface for remote management of UNIX-like virtual machines, and VNC enables graphical remote management of virtual machines regardless of operating systems.
Here we take a Linux VM (CentOS-1vcpu-2gb-HKG-1
) and a Windows VM (Windows-1vcpu-2gb-IAD-1
) as examples to demonstrate how to remote access them using you local computer.
CentOS-1vcpu-2gb-HKG-1
Default username: root
Password: Test+123
Windows-1vcpu-2gb-IAD-1
Default username: Administrator
Password: Test+123
Note
See Create an Instance for detailed information about how to create a virtual machine instance.
Your virtual machine will be associated with one security group at least while being created. To remote access successfully, please ensure the security group allows traffic on the following ports: TCP 22 ( for SSH), TCP 3389 (for RDP), and ICMP port (used for network management and debugging).
The steps below may vary depending on the operating system and applications you are using. You may need to use different commands or tools to perform the same actions.
When you need to access a Linux virtual machine, you can use SSH. Assume a macOS Terminal and a Windows PowerShell.
If you have deployed the SSH public key to your server, you can also using the SSH key for authentication without entering a password.
Ensure the virtual machine has SSH enabled and is running.
Obtain the public IP address of the virtual machine you want to access, that is a Linux VM (CentOS-1vcpu-2gb-HKG-1
). You can find this information in the instance list page on zenConsole. Here is 128.1.97.230
.
Open the Terminal application on your macOS computer. You can find it in the Applications > Utilities folder, or you can use Spotlight to search for it.
In the Terminal, use the SSH command along with the IP address of the virtual machine to establish a remote connection. The command syntax is as follows:
Press Enter, and Terminal will attempt to establish an SSH connection to the virtual machine. If this is your first time connecting to the VM, you may be prompted to confirm the authenticity of the host by verifying its key fingerprint. Type yes
to proceed.
After the SSH connection is successfully established, you will be prompted to enter the password for the selected username on the virtual machine. Here provide Test+123
and press Enter.
Once authenticated, you will have a Terminal session open on your macOS computer, but with the remote virtual machine's command-line interface. From here, you can execute commands and perform administrative tasks on the virtual machine.
When you need to access a Windows virtual machine, you're recommended to use RDP.
Ensure that the Windows virtual machine is running and has RDP enabled. RDP is available by default on Windows operating systems.
Obtain the public IP address of the virtual machine, that is a Windows VM (Windows-1vcpu-2gb-IAD-1
). You can find this information in the instance list page on zenConsole. Here is 98.96.218.54
.
Open the Remote Desktop client application on your local computer. This application is built into Windows, and you can find it by searching for "Remote Desktop" in the Start menu.
In the Remote Desktop client, enter the public IP address, that is 98.96.218.54
, of the virtual machine in the "Computer" field.
Click Connect to initiate the connection.
If prompted, enter the credentials for the user account on the virtual machine.
- Default username: Administrator
- Password: Test+123
Once authenticated, the Remote Desktop client will establish a connection to the Windows virtual machine. You will see the virtual machine's desktop displayed on your local computer.
You can now interact with the Windows virtual machine as if you were sitting in front of it. You can run applications, access files, configure settings, and perform any other tasks you would normally do on a Windows desktop.
Remember to ensure that the necessary firewall rules are configured on both the virtual machine and your local machine to allow RDP connections.
You can remote access a Linux virtual machine via VNC.
You can remote access any virtual machine vis VNC on zenConsole. Please obtain the public IP address of the virtual machine you want to access before remote access. Here we take the Linux VM (CentOS-1vcpu-2gb-HKG-1
) as an example.
Default username: root
Password: Test+123
Go to virtual machine instance list page and click CentOS-1vcpu-2gb-HKG-1
to enter Detail page.
Click VNC Access to enter VNC access interface. Wait until it shows:
Enter the default username: root
, and press Enter
Press Enter, and Terminal will attempt to establish an SSH connection
Enter the password for the virtual machine. Here provide Test+123
and press Enter.
Once authenticated, the VNC will establish a connection to the virtual machine. You should see the VM's desktop or graphical interface displayed in the VNC client window.
(optional) You can paste your code on the Clipboard and click Run to quick run your command.
You can remote access a Windows virtual machine via VNC.
You can remote access any virtual machine vis VNC on zenConsole. Please obtain the public IP address of the virtual machine you want to access before remote access. Here we take the Windows VM (Windows-4vCPU-16gb-HKG-A-1
) as an example.
Go to virtual machine instance list page and click Windows-4vCPU-16gb-HKG-A-1
to enter Detail page.
Click VNC Access to enter VNC access interface. Wait until it shows:
Go to Keyboard Shortcuts > Ctrl+Alt+Del.
Find your password in your email box. Click Clipboard, enter the password and click Run.
The protocols and access methods mentioned above provide convenience and flexibility in different scenarios. You can choose the way that best suits your needs to remotely access and manage your virtual machines, whether it's using a graphical user interface or a command-line interface.