Adding known hosts to your build process

During the build process, your commands may attempt to make an SSH connection to another service such as Github, Codebase or another host. By default we allow connections to any service, however you may manually define hostnames and public keys here to restrict what servers can be connected to with SSH during your build.

To define a known host, navigate to the Known Hosts area at the bottom, within the Build Configuration page in your Build Pipeline, clicking to add a new known host:

New Known Host

Add a description for your host, the public host key below, then click Create Known Host to finish.

Retrieving the host key

When adding a new known host, if you don't know the hostkey, you can obtain it with the command ssh-keyscan -t rsa example.com | cut -d ' ' -f 2-3. The example below shows the command to retrieve the host key for Codebase:

$ ssh-keyscan -t rsa codebasehq.com 2>/dev/null | cut -d ' ' -f 2-3

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqafgFtYVquYfReJa3MGIyGz0RZoc1kfnXHFDjprY4Uy0lwia+35rRa9Aycrf4eySa55JXsg7rOosqpNOi2hSFWHQ/FfKzMH077Vu1X6d5gNBzxR3aJq/zaAJSiRbrUM20NgEHzBiT8x+32zM71E4qjKnGG8AdEqV9AmROXHWddLSs3e5Tsr2+Dkc/lu+Ko4eVjFjW3ZUgTRE3VTd+PDSRGOfmimgBpcuhkBbEyK4+dq7NJKxLbUl9zC7jKPddkWpbonR9CYWj+c8R8MimKLhhSilNRUKuQBNYydol3eX8VNi+PTzAYtB/w8/jl3+BWzj6xAyfMRdeJDyhhTYX+/s+w==

Proudly powered by Katapult. Running on 100% renewable energy.