We have the RSA Keys setup so that both the user1 (local user) and user2 ID’s will work without a password as long as the scripts are run as user1. The issue is that when the perl script runs it does not recognize that user1 ran the script and the RSA key setup does not allow just anyone to execute.
How could I set up the key so any one can execute my script?
If I'm understanding this correctly you want to share the keys on one host so multiple users on that host can use it for authentication.
You don't mention which operating system you're using, but on Linux (or any unix) you can
Then, in your perl script, use the "--identity-key-file=/etc/ssh2/shared-keys/key1" command line option to make the sshg3 or scp3 commands use the shared public key.
On Windows, you can achieve the same with a local user group and access control lists for the key files. The particulars are different but the general idea is the same.
Security notice: Group members have read access to the public key file. Therefore, they are able to copy the private key and do whatever they want with it, such as give it to a user who is not in the group.
A more secure way to achieve a similar thing is to use "host-based" authentication - please refer to the manual for more information.
answered Sep 03 '10 at 09:40
Ville Laurikari ♦