Connect to an Azure virtual machine with RDP or SSH
Updated: September 17, 2014
This article is a short summary of using Remote Desktop Protocol (RDP) or a Secure Shell (SSH) client to log on to a Azure virtual machine. It also has requirements and troubleshooting tips, with links to detailed instructions.
To log on to a virtual machine, you use Remote Desktop for Windows operating systems, or a Secure Shell (SSH) client for Linux operating systems. From the Azure Management Portal, after you’ve selected the virtual machine, click Connect at the bottom of the screen to start a remote session. To find the SSH information such as hostname and port number in the Management Portal, select the virtual machine and look for SSH Details in the Quick Glance section of the dashboard. For more instructions on logging on, see one of the following:
How to Log on to a Virtual Machine Running Linux
How to Log on to a Virtual Machine Running Windows Server
To be able to log on, you’ll need the following:
The user name and password of the account you set up for administrative access.
This account was set up when the virtual machine was created, with the user name and password that you specified. If you created a Linux VM, you might have used the default user name of ‘azureuser’.
Tip If you can’t remember the user name or password for your VM, you can use the VMAccess for extension to do that. You don’t need to know the existing password, so this gives you a way to recover if you’ve forgotten the password. But, you do need to have the VM agent installed to be able to use the extension. If you didn’t install it when you created the VM, it’s available through a standalone installer that you can download. For details on the VMAccess extension, see the following: For Linux VMs: Using VMAccess Extension to Reset Login Credentials for Linux VM. For Windows VMs: VM Agent and Extensions – Part 2.
An endpoint to allow access from the client to the virtual machine through the specified port and protocol.
This is usually done for you automatically when you create a virtual machine in the Management Portal. If you use the Quick Create option, the appropriate endpoint is set up automatically. If you choose the From Gallery option, an endpoint is set up for Remote Desktop or SSH unless you remove the endpoint while you’re configuring the virtual machine. To check or set up endpoints on an existing virtual machine, see How to Set Up Endpoints to a Virtual Machine.
The firewall of the guest operating system configured to allow access.
This is done automatically if you use an image provided by Azure to create the virtual machine. If you use an image you’ve uploaded, make sure to configure it for remote access before you upload it.
The following tips give you an overview of what you can try if you have problems connecting. For detailed instructions on troubleshooting, see Troubleshooting Endpoint Connectivity.
Try to start the connection again. When you’re prompted for password, look at the domain information that’s added to the user account. If it’s not the correct domain for the user account on the virtual machine, specify the correct domain. For example, in Remote Desktop Connection, you can select Other User, add a backslash before user name and then type the password.
Restart the virtual machine.
Delete and then recreate the endpoint that for Remote Desktop or SSH. When you recreate the endpoint, use the default values.
Try to connect using a different network. For example, if you are using a corporate network, try a network that’s separate from the corporate network. If that works, it indicates that the corporate network doesn’t allow that type of connection. For example, the connection might be blocked by the corporate firewall. Contact your corporate network administrator for help.
If none of those tips work, you might need to resize or recreate the virtual machine. The detailed instructions noted above provide more information.