Logging Into Ops Manager VMs with SSH

Page last updated:

This topic describes how to use SSH to connect to the Ops Manager VM or the BOSH Director VM.

Overview

To troubleshoot your Ops Manager deployments successfully, you may need to SSH into the Ops Manager or BOSH Director VM.

After you successfully SSH into the Ops Manager VM, you can perform troubleshooting operations. For more information about troubleshooting, see Advanced Troubleshooting with the BOSH CLI.

Log Into the Ops Manager VM with SSH

Use SSH to connect to the Ops Manager VM. To log into the Ops Manager VM, go to the procedure for your IaaS:

AWS

To log in to the Ops Manager VM with SSH in AWS, you need the key pair you used when you created the Ops Manager VM. To see the name of the key pair, click on the Ops Manager VM and locate the key pair name in the properties.

To log in to the Ops Manager VM with SSH in AWS, do the following:

  1. Locate the Ops Manager FQDN on the AWS EC2 instances page.

  2. Run chmod 600 ops_mgr.pem to change the permissions on the .pem file to be more restrictive. For example:

    $ chmod 600 ops_mgr.pem
    
  3. Run ssh -i ops_mgr.pem ubuntu@FQDN to log in to the Ops Manager VM with SSH. Replace FQDN with the fully qualified domain name of Ops Manager. For example:

    $ ssh -i ops_mgr.pem ubuntu@my-opsmanager-fqdn.example.com
    

Azure

To log in to the Ops Manager VM with SSH in Azure, you need the key pair you used when creating the Ops Manager VM. If you need to reset the SSH key, locate the Ops Manager VM in the Azure portal and click Reset Password.

To log in to the Ops Manager VM with SSH in Azure, do the following:

  1. From the Azure portal, locate the Ops Manager FQDN by selecting the VM.

  2. Change the permissions for your SSH private key by running the following command:

    $ chmod 600 PRIVATE-KEY
    

    Where PRIVATE-KEY is the name of your SSH private key.

  3. SSH into the Ops Manager VM by running the following command:

    $ ssh -i PRIVATE-KEY ubuntu@FQDN
    

    Where:

    • FQDN is the FQDN for your Ops Manager deployment.
    • PRIVATE-KEY is the name of your SSH private key.

GCP

To log in to the Ops Manager VM with SSH in GCP, do the following:

  1. Confirm that you have installed the Google Cloud SDK and CLI. For more information, see the Google Cloud Platform documentation.

  2. Initialize Google Cloud CLI, using a user account with Owner, Editor, or Viewer permissions to access the project. Ensure that the Google Cloud CLI can login to the project by running the command gcloud auth login.

  3. From the GCP web console, navigate to Compute Engine.

  4. Locate the Ops Manager VM in the VM Instances list.

  5. Under Remote access, click the SSH dropdown and select View gcloud command.

  6. Copy the SSH command that appears in the popup window.

  7. Paste the command into your terminal window to SSH to the VM. For example:

    $ gcloud compute ssh "YOUR-VM" --zone "YOUR-ZONE-ID"
    
  8. Run sudo su - ubuntu to switch to the ubuntu user.

OpenStack

To log in to the Ops Manager VM with SSH in OpenStack, you need the key pair that you created in Configure Security in Deploying Ops Manager on OpenStack. If you must reset the SSH key, locate the Ops Manager VM in the OpenStack console and boot it in recovery mode to generate a new key pair.

To log in to the Ops Manager VM with SSH in OpenStack, do the following:

  1. Locate the Ops Manager FQDN on the Access & Security page.

  2. Run chmod 600 ops_mgr.pem to change the permissions on the .pem file to be more restrictive. For example:

    $ chmod 600 ops_mgr.pem
    
  3. Run ssh -i ops_mgr.pem ubuntu@FQDN to log in to the Ops Manager VM with SSH. Replace FQDN with the fully qualified domain name of Ops Manager. For example:

    $ ssh -i ops_mgr.pem ubuntu@my-fqdn.example.com
    

vSphere

To log in to the Ops Manager VM with SSH in vSphere, you must have the public SSH key that imports the Ops Manager .ova or .ovf file into your virtualization system.

You set the public SSH key in the Public SSH Key field of the Customize template screen when you deployed Ops Manager. For more information, see Deploy Ops Manager in Deploying Ops Manager on vSphere.

Note: If you lose your SSH key, you must shut down the Ops Manager VM in the vSphere UI and then reset the public SSH key. For more information, see Edit vApp Settings in the vSphere documentation.

To log in to the Ops Manager VM with SSH in vSphere, do the following:

  1. Run the following command:

    ssh ubuntu@FQDN
    

    Where FQDN is the fully qualified domain name of Ops Manager. For example:

    $ ssh ubuntu@my-fqdn.example.com
    

  2. When prompted, enter the public SSH key.

SSH Into the BOSH Director VM with SSH

Do the following steps to log in to the BOSH Director VM with SSH:

  1. From Ops Manager, open the BOSH Director tile.

  2. Select the Credentials tab.

  3. Next to Bbr Ssh Credentials, click Link to Credential. A tab opens containing a JSON credential structure.

  4. Copy the RSA PRIVATE KEY and paste it into a file named bbr.pem. Include -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----.

    Warning: Keep the key secure. The key provides full access to the entire Ops Manager environment.

  5. Replace all \n characters in bbr.pem with a line break.

  6. Copy bbr.pem to the ~/.ssh/ directory on your computer.

  7. Run chmod 600 ~/.ssh/bbr.pem to modify the permissions of the file.

  8. Log in to the BOSH Director VM with SSH from your machine.

    ssh bbr@BOSH-DIRECTOR-IP -i ~/.ssh/bbr.pem
    

    Note: If you use GCP, ensure SSH port 22 is open for the BOSH Director VM in your GCP console. If the SSH port is not open, open it by creating a firewall rule.

  9. Run sudo -i to get the root privilege.