Best practices for securing SSH access to VM instances


When you grant users access to connect to virtual machine (VM) instances using SSH, you impact the security of your VM and any resources that your VM has access to, such as storage buckets or databases.

You can limit the risks related to SSH access by following several best practices, including:

  • Control network access: Implement zero trust access controls to restrict the networks, locations, and devices from which users can establish SSH connections to your VMs, and avoid VMs from being more exposed than necessary.

  • Control SSH login access: Restrict which users are allowed to establish SSH sessions and ensure that login access is revoked in a timely manner.

  • Protect SSH credentials: Require users to authenticate with multiple factors and protect credentials from being leaked.

  • Audit SSH access: Maintain a reliable audit trail that tracks all SSH access.

What's next