Wrong format
Specifically, Mac OSX Mojave’s ssh-keygen will generate newer style OpenSSH key pairs by default. However, these keys may not be backward compatible. You can tell the kind of keypair you are generating by looking at the preamble of the private key file.
👍 Compatible
—–BEGIN RSA PRIVATE KEY—–
🚫 Not compatible
—–BEGIN OPENSSH PRIVATE KEY—–
To create the older style PEM keypair which is compatible with GitFTP-Deploy, you have to generate the key with the following command.
ssh-keygen command: -m PEM
You can convert a newer style of OpenSSH key to PEM-format with this command:
ssh-keygen -p -m PEM -f ~/.ssh/<path-to-my-key>
Locked keychain
Your SSH-keys are not read directly by GitFTP-Deploy. Instead they are stored in the keychain. Pre-Sierra this was not a problem. But on newer versions of macOS this can cause problems if the keychain is locked. I am currently investigating this, meanwhile here are some workarounds.
Manually add key to keychain
ssh-add -K <key>
(it’s recommended to use absolute path of keys) call the command ssh-add -A
on every startup of macOS.
mkdir ~/.ssh
Or create a SSH configuration
Create ~/.ssh/config
Add the following to the file
Host server.example.com
IdentityFile ~/.ssh/id_rsa
UseKeychain yes
Read more
https://developer.apple.com/library/archive/technotes/tn2449/_index.html#//apple_ref/doc/uid/DTS40017589 https://github.com/jirsbek/SSH-keys-in-macOS-Sierra-keychain ssh - What is the difference between PEM format to DSA/RSA/ECC? (Might I confuse PEM with these)? - Information Security Stack Exchange