问题
SSH key authentication is frowned upon in my environment (a point I disagree with) so Rundeck users are forced into entering their SSH password at run time into a "Secure Remote Authentication" option. Short of setting up two separate options, one "Secure" to pass to the scripts and the other "Secure Remote Authentication" for authenticating the SSH sessions, is there any way to force the contents of a "Secure Remote Authentication" job option to also be passed to a script that the job is executing?
回答1:
Yep, I think what you are looking for is this:
Something like this in your node:
<node name="egon" description="egon" osFamily="unix"
username="rundeck"
hostname="egon"
ssh-authentication="password"
ssh-password-option="option.theSamePasswordOption"
sudo-command-enabled="true"
sudo-password-option="option.theSamePasswordOption" />
As long as that option is a 'Secure Remote Authentication' option, it should work for both cases.
I noticed that I had to remove the stored password option from the project settings in order for the authentication to use the passed in option value.
来源:https://stackoverflow.com/questions/27319740/force-rundeck-secure-remote-authentication-option-to-pass-to-script