I need to write a script that runs several tasks against a remote server via SSH & rsync. To be keep it simple, imagine just an rsync followed by a command via SSH.
I don't want this to be passwordless - I want the script to require the remote password before it runs. But I don't want to have to enter it again until the script ends.
Is there a good way to do this?