scp using a password on the command line
- by spierepf
I am trying to write a script that will deploy a build created on my desktop machine (windows/cygwin) to a machine in my test environment (linux).
I would like to use scp to copy the build to the target machine. The only account on the target machine is root, and I cannot create a special user for this task. The root user is unable to log in using an ssh key (I suspect that this is configured on the ssh server, but I do not know which configuration options control this). At any rate, I cannot change the configuration of the ssh server.
My desktop machine uses Cygwin, and I have ssh installed. What I need is the command-line-fu that will allow me to put the password on the command line.
I am aware of the dangers of having a plaintext password in a shell script, but that is not a concern here.