Don't use a password. Generate a passphraseless SSH key and push it to your VM/server.
If you already have an SSH key, you can skip this step. Just hit Enter for the key and both passphrases:
$ ssh-keygen -t rsa -b 2048
Generating public/private rsa key pair.
Enter file in which to save the key (/home/<username>/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again: