return R('ERR_MISSING_PARAMETER', msg => "Missing 'group' or 'account' for ssh_test_access_way");
@ -1001,10 +1003,15 @@ sub ssh_test_access_way {
}
if (not @keyList) {
return R('OK_NO_KEYS_TO_TEST',
msg =>
"Couldn't find any accessible SSH key to test connection with, you're probably adding access to an account or a group you don't have access to yourself, nevermind, will continue"
);
if ($forceKey) {
return R('KO_NO_MATCHING_KEY', msg => "Couldn't find any key with the fingerprint you specified");
}
else {
return R('OK_NO_KEYS_TO_TEST',
msg => "Couldn't find any accessible SSH key to test connection with, "
. "you're probably adding access to an account or a group you don't have access to yourself, "