To help debug issues with jobs you are able to rerun a job with an SSH session.
Rerun job with SSH feature is intended for debugging purposes.
When using the feature a new job will be created inside of the same pipeline as the original job but it will include a new job named
Enable SSH within this job you will see the connection information.
The steps to use the feature are below:
To start a job with SSH enabled, select the ‘Rerun job with SSH’ option from the ‘Rerun Workflow’ dropdown menu.
To see the connection details, expand the ‘Enable SSH’ section in the job output where you will see the SSH command needed to connect.
The details are displayed again in the ‘Wait for SSH’ section at the end of the job.
SSH to the running job (using the same SSH key that you use for GitHub or Bitbucket) to perform whatever troubleshooting you need to.
Please see the following link for more information: https://circleci.com/docs/2.0/ssh-access-jobs/