SSH RSA passphrase in script ?
Hello,
when generating RSA public/private key pair, I gave a passphrase to protect the key. When I now want to use this private key in a script to log on to the remote server via ssh and do something, how can I give the passphrase ?? Alternatively, is it possible to use a different private key without passphrase ? I doubt it, but it doesn't harm to ask. |
What's the task at hand, is it going to be running as cron-job
for a system user? You could use "expect" to script the pass-phrase, but that's always a bad idea. You could generate a new account and have it use a passwordless key to connect to the same user (you can't -trivially- have two key-pairs for one user). You could use ssh-agent & ssh-add for the account in question, which means you'd have to manually enter the passphrase when the machine gets rebooted. Cheers, Tink |
Quote:
|
All times are GMT -5. The time now is 03:22 AM. |