On Thu, Jun 07, 2001 at 02:07:50PM -0400, Steven Hatfield wrote:
On Thursday 07 June 2001 02:12 pm, you wrote:
I am writing some shell scripts that use scp to copy files to different locations on the network, how do I pass the user's password in via the script for it to connect to the remote machine?
Tia Eric
You can make a public key with ssh that will make it so that you don't have to enter a password at all when connecting to the remote machine.
Caveat: If anyone has a really nice example of how to do this (in plain English please), I'd LOVE to see it. I've gotten it to work before, but I really questioned the security ramifications of doing so.
Sysadmins on this list: What do you suggest?
Use ssh-agent. First: run 'ssh-agent bash'. Second: run 'ssh-add' and put your key and password into memory Third: run ssh or scp without the need the enter passwords.... Much safer than keys without a pass-phrase...
Thanks in advance, Steven
Regards, Cees.