[ale] automating ssh script

Ed Landa elanda at xeme.com
Tue Jul 30 08:25:28 EDT 2002


> So, using this method, you still get an initial prompt for the passphrase if
> the key contains one.  Not ideal for automation.

One alternative is creating a key for the specific task you have in mind and
restricting it on the server end.  In the authorized_keys you can specify the
"command" option for a certain key, which will have ssh execute that command
when the key is used to connect, ignoring any command the user might have sent.
Use the -i option of ssh to specify the key to use so that ssh doesn't
negotiate using all of its keys.

This has worked fairly well for me in the past.

Ed

 PGP signature




More information about the Ale mailing list