<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
ASA/OPA will not Connect to Server in Google Cloud Platform
Okta Classic Engine
Privileged Access
Okta Identity Engine
Advanced Server Access
Overview

The SSH connection through Okta Advanced Server Access(ASA)/Okta Privileged Access(OPA) fails to connect to a Linux server in GCP.

Applies To
  • Advanced Server Access (ASA)
  • Okta Privileged Access (OPA)
  • Google Cloud Platform (GCP)
  • Secure Shell (SSH)
Cause

If the OS Login feature is used, then it will update the sshd configuration with the following directives** on the server:

#### Google OS Login control. Do not edit this section. ####
#TrustedUserCAKeys /etc/ssh/oslogin_trustedca.pub
#AuthorizedPrincipalsCommand /usr/bin/google_authorized_principals %u %k
#AuthorizedPrincipalsCommandUser root
#AuthorizedKeysCommand /usr/bin/google_authorized_keys
#AuthorizedKeysCommandUser root
#### End Google OS Login control section. ####

OPA/ASA agents use similar directives, but because of the order in sshd_config, the first ones (added by GCP) take precedence. As a result, the ASA/OPA SSH session will fail. The workaround is to comment out the directives (using #), followed by an sshd restart or disabling OS login.

 

**NOTE: The directives are shown in a commented state here, starting with #. They will not be the same on the server /etc/ssh/sshd_config and need to be commented as a workaround.

Solution

OS login should be disabled on GCP as the configuration will be added back even if commented out.

 

Related References

Loading
ASA/OPA will not Connect to Server in Google Cloud Platform