1 - You can script sshpass's ssh
command like this:
#!/bin/bash
export SSHPASS=password
sshpass -e ssh -oBatchMode=no user@host
2 - You can script sshpass
's sftp
commandlike this:
#!/bin/bash
export SSHPASS=password
sshpass -e sftp -oBatchMode=no -b - user@host << !
put someFile
get anotherFile
bye
!