I need to script SCP and I need to be able to do this by passing in the password in plain text. I am absolutely aware of the horrible design pattern that I am asking for. I cannot use certificates for this application. My challenge is that the box that I am working on cannot and willnot have expect or perl's Net::SFTP module. I have an HP-UX box with ksh and a basic perl install.
Using SSH keys is out because of a workplace requirement. I don't make the policy, but I do have to abide by it.
socat
dark magic like so:(sleep 3; echo PASS; sleep 5; echo "uname -a") | socat - EXEC:'ssh -l user hostname',pty,setsid,ctty
. In the name of all that is holy, please don't use this for a production environment :)