Nanobox Now Supports Password-Protected SSH Keys

The latest update to Nanobox Desktop (the Nanobox CLI) introduces support for password-protected SSH keys. When Nanobox provisions local "build" and "run" containers, it copies SSH keys from your ~/.shh directory into the containers. This allows SSH-dependent actions to run successfully inside these containers without any required changes or additional setup to SSH-dependent services (git, private packages, etc.).

Previously, if a password-protected SSH key was used, it would prompt for a password. This prompt was buried deep in the virtualization/networking stack, making it difficult to pipe user input down into the password prompt. The build process would hang, waiting for a response.

With the latest version of Nanobox, user input is piped down through the stack into prompts awaiting input. This allows SSH key passwords to be entered along with other actions requiring user input.

Update to the Newest Versions

In order to use password-protected SSH keys with Nanobox, you'll need to update to the most recent version of Nanobox, update the your local Nanobox Docker images, and set the config to use encrypted SSH keys.

# Update Nanobox
nanobox-update

# Update Nanobox Docker images
nanobox update-images

# Enable Encrypted SSH Keys
nanobox config set use-encrypted-keys true

Things to Know

When using a password-protected SSH key, you will be prompted for the password any time Nanobox builds your application's runtime.

Additional SSH Key Functionality

If you don't want all SSH keys in your ~/.ssh directory included in your build and run containers or your SSH keys are stored at a different location, Nanobox lets you to specify the path to the key you'd like to use.

nanobox config set ssh-key ~/path/to/private_key

Posted in Features, Updates