![]() |
|
There's more than one way to do things | |
PerlMonks |
Populating authorized_keys with Expectby cmv (Chaplain) |
on Nov 24, 2008 at 18:46 UTC ( #725668=perlquestion: print w/replies, xml ) | Need Help?? |
cmv has asked for the wisdom of the Perl Monks concerning the following question:
Folks-
I have 2 questions here:
1.) Is this a reasonable implementation for populating the authorized_keys file for a user on a remote system under their login? The implementation relies on using expect to handle transporting the users typed-in password to ssh in order to populate far-end authorized_keys the first time. Thereafter the users ssh requests will not need a password anymore. This requires that the user already has a public and private key setup on their local system. It does not need to worry about wether or not the private key is password protected or not. It just ships the public key over to the target system and installs it into their authorized_keys file. The only thing I came up with in super-search on this topic, was scp and ssh without passwd, and I couldn't understand why doing this was effecting security any. Thanks -Craig PS - Also, any suggested improvements are welcome! UPDATE: s/crap/authorized_keys in example program
Back to
Seekers of Perl Wisdom
|
|