Balena ssh fails with Permission denied (publickey)

Three things to check if SSH is not working:

  1. Check that the SSH key has been uploaded to balena (Preferences -> SSH keys). Take a copy of the key.
  2. Check that the public key file ~/.ssh/id_rsa.pub exists, and has the same contents as the uploaded key from check 1.
  3. Check that you have a private key file ~/.ssh/id_rsa which corresponds to the public key you checked in check 2.
    This got balena ssh working for me on MacOS. (The key creation command is ssh-keygen -t rsa)
1 Like