Closed matthew-banning closed 4 years ago
KEY_FILE is given a default of /id_rsa if SSH_KEY_FILE is not set:
KEY_FILE
/id_rsa
SSH_KEY_FILE
# Set up key file KEY_FILE=${SSH_KEY_FILE:=/id_rsa}
But then when the key is added to the SSH agent SSH_KEY_FILE is used rather than KEY_FILE:
eval $(ssh-agent -s) cat "${SSH_KEY_FILE}" | ssh-add -k -
This means that if SSH_KEY_FILE is not set and a key is mounted to /id_rsa it will not be used in authentication.
This issue seems to have originated in 2295b907ff53559813ee4e2857b7e4721670d2fe
Nevermind, didn't realise ${SSH_KEY_FILE:=/id_rsa} also set SSH_KEY_FILE
${SSH_KEY_FILE:=/id_rsa}
Happy to help! :)
KEY_FILE
is given a default of/id_rsa
ifSSH_KEY_FILE
is not set:But then when the key is added to the SSH agent
SSH_KEY_FILE
is used rather thanKEY_FILE
:This means that if
SSH_KEY_FILE
is not set and a key is mounted to/id_rsa
it will not be used in authentication.This issue seems to have originated in 2295b907ff53559813ee4e2857b7e4721670d2fe