Linux.com

Re:use ssh-agent & ssh-add instead of null pas

Posted by: Anonymous Coward on March 27, 2004 08:32 AM

Actually if you are looking for automated tasks you can get security and passwordless login by adding a command in front of the key in the autorized keys file.


Something like:


command='/path/to/command' rsa-key-to-follow


Then when you ssh to the server with the authorized keys you can only run the command '/path/to/command'.


You can have multiple identity keys that map to different commands, or you can have a wrapper script that checks the environmental variable SSH_ORIGINAL_COMMAND and cases it against authorized commands.

#

Return to Using key-based authentication over SSH