Learn how to connect to your Virtual Machines using SSH (Secure Shell). SSH provides secure command-line access to both Linux and Windows VMs, enabling you to manage your systems remotely through a terminal interface.
SSH is the standard method for secure remote access to Unix-like systems and is now also supported on Windows Server. It provides encrypted communication, making it safe to manage your VMs over the internet. Unlike RDP, SSH is text-based and requires less bandwidth, making it ideal for automated tasks.
Getting Started with SSH Access
Before connecting via SSH, ensure you have:
- SSH enabled on your VM: Port 22 open in Network Security Group
- SSH keys configured: Public key authentication is recommended over passwords
- VM credentials: SSH private key saved locally and securely (You can also opt for a username/password access, which is less secure)
- SSH client installed: Built into most modern operating systems
🔐 Storing your SSH Key
Remember to download and save the SSH private key when creating your VM with SSH enabled. Store it in the proper location (typically the ~/.ssh folder) and secure it with chmod 600 permissions.
Quick Connection Example
Once your SSH keys are configured, connecting is straightforward:
- With SSH key:
ssh -i /path/to/private-key username@your-vm-ip-address
- With password:
ssh username@your-vm-ip-address
-- you will be prompted for the password
SSH Connection Guides by Platform
SSH to Windows VMs
Official Microsoft guide for connecting to Windows Server VMs using SSH. Covers OpenSSH setup and configuration on Windows-based Azure VMs.
SSH to Linux from Mac/Linux
Complete guide for connecting to Linux VMs from macOS or Linux systems. Includes SSH key generation, authentication, and security best practices.
SSH to Linux from Windows
Step-by-step instructions for Windows users to connect to Linux VMs using various SSH clients including Windows Subsystem for Linux (WSL) and PuTTY.