I would go so far as to say thaty ou should NEVER automate the copying of your keys.
That's about on par with automating the installation of sshd on the remote machine everytime you wanted to connect.
That said, if you can can get your ssh keys set up so that your normal,
commandline ssh client can connect to your romote system,
then you should be good to go -- just don't specify a
password to $ssh->login($user).
(You might run into passphrase issues ... but I think
Net::SSH::Perl can deal with a key agent if you have one
running -- I would guess that if you're trying to automate
something, you probably want to use passphraseless key's
anyway.) | [reply] [d/l] [select] |
I don't know what's the big deal, I could have just manually copy the public key over to the remote server once, then I can login without providing the password, since I have the private key. Even if you are doing this once, you still have to distribute the public keys over to your remote server. I've just done it using Expect to run scp command, save a lot of time. But if you know of anything else like expect that would allow me to provide the password to scp in a script fashion, please let me know.
Just one thing with Expect, is there a way to NOT show the password on the screen as it run? If not, then is there a way to make it show up like xxxxx, but still pass the password over to scp.
Thanks.
| [reply] |
Well, my point was just that a one-time task doesn't seem worth automating.
| [reply] |