JuiceSSH supports OpenSSH PEM format private keys. Whilst we hope to add key generation and public key exporting soon, this is not yet in place. In the meantime, the quickest way to use a private key with JuiceSSH is to copy the key file to your device's SD-Card and then associate the key with an identity via Smart Search.
To do so:
- Copy your private key file to your device, via a trusted method. E.g. USB.
- Open JuiceSSH, navigate to Connections and swipe left to Identities.
- Create or update an identity. (Long press + Edit to update.)
- Ensure that the Username is set for the identity
- Hit "Set (Optional)" to set a Private Key.
- Select "Smart Search" to fire off a multi-threaded search of your sd-card. Alternatively, paths can be entered relative to your sd-card's root.
- Select your key file and hit "OK"
- Save your identity.
Now, when you create connections, you should be able to select your private key enabled identity and then authenticate as expected.
If your key file is still not being found by Smart Search, you can see the exact method which is used to check each file here.
It reveals that the criteria for being recognised as a valid key file are:
File size < 8kb
First 37 chars contain one of:
- "-----BEGIN RSA PRIVATE KEY-----"
- "-----BEGIN DSA PRIVATE KEY-----"
- "-----BEGIN PRIVATE KEY-----"
- "-----BEGIN ENCRYPTED PRIVATE KEY-----"