Enable SSH for this build does not work. Only when build is rebuilt SSH access is granted




as shown in the documentation, I should be able to enable SSH access to a running build by clicking on the button which says “Enable SSH for this build”. This is documented here: https://circleci.com/docs/1.0/ssh-build/

When I click on the button, I can see the port and IP address for the machine. However, when I access with SSH with my authorized SSH key, I receive a permission denied error. When I click on “Rebuild with SSH”, I can access using the same key as before. I can always connect via SSH, when I “rebuild with SSH” and I can never connect when I enable SSH on a running build.

I can exclude problems with my SSH key, as I can connect upon rebuilt, as mentioned before. Connecting to a running instance does not work, my colleagues report the same behavior. They can connect upon rebuilt, but not upon “Enable SSH for this build”.

I found older forum posts in this direction, but no solution. Is SSH for running builds working for anyone? It slows down the process for debugging considerably, as I have to restart the build process as soon as an error occurs and wait until it happens again. Any suggestions?

Thank you very much,
kind regards



I am also having this issue


That’s not a lot of information to go on. Are you using CircleCI 1.0 or 2.0?

One thing you could do is to set a project-specific environment variable FORCE_FAIL, which is normally empty. In your build, cause it to fail if it is not empty, and then you can force a failure at will, getting you SSH access more quickly. It’s not completely elegant, but it’d work.