I'm figuring out how to best create a bash script that accepts username, password and host as input and can then use ssh/rsync/scp to connect. It seems that these programs only accept password that is given by the user via prompt.
Note: I am well familiar with SSH keys - my use case is a situation where one wants to programmatically place an SSH key to a server where a key does not exist.
My current solution is to use expect
to answer the password prompt with the correct password (and provide all other information as parameters).