I have my privkey.pem private key in the form
-----BEGIN RSA PRIVATE KEY-----
xxx
-----END RSA PRIVATE KEY-----
I need to make a Bamboo task to connect to a server via ssh using this key. Unfortunately I see that Bamboo can store only variables in one line, so if I paste the key all the "\n" get stripped out so this doesn't work:
eval $(ssh-agent -s)
echo "${bamboo.sshKey}" | ssh-add - > /dev/null
scp -vvv -o StrictHostKeyChecking=no .....
Is there a way to have a private key in a "one line" format readable from ssh-add? Or, is there a clean way to reparse the key to get again the stripped "\n"?