SSH connection
SSH connection checklist
Go through the items below in order.
1. Verify a public IP is attached
In the ECI portal, open Compute > Virtual Machines and check that a public IP is shown on the VM's detail page.
2. Verify port 22 is allowed in the virtual-network firewall
Firewall rules are set per virtual network. On the detail page of the VM's virtual network, check Firewall rules for an inbound TCP 22 rule (it's safer to narrow the source IP to your own).
Add it if missing. Changes take effect within one minute. Firewall guide
3. Verify the in-VM firewall (UFW)
Connect via the web console and run:
sudo ufw status
If port 22 isn't allowed:
sudo ufw allow 22/tcp
sudo ufw reload
4. Verify the sshd service
sudo systemctl status sshd
sudo ss -tnlp | grep :22
If sshd isn't running:
sudo systemctl restart sshd
5. Verify password authentication is enabled (Ubuntu default)
Ubuntu cloud-init disables password SSH by default (/etc/ssh/sshd_config.d/60-cloudimg-settings.conf or a similar file has PasswordAuthentication no). Enable it via the web console:
# Check the cloud-init password-auth setting
sudo grep -r "PasswordAuthentication" /etc/ssh/
# Enable (in the global sshd_config or any drop-in file)
sudo sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config.d/*.conf 2>/dev/null || true
sudo systemctl restart sshd
Include the commands above in the init script at VM creation time to enable password auth automatically every time without manual steps.
6. Verify key file permissions (client side)
chmod 600 ~/.ssh/your-key.pem