Now a days, it's very difficult remember the vm passwords while connecting in the office network. So, Connect easily using sshpass.
For installation for mac/Linux:
Mac:
brew install hudochenkov/sshpass/sshpass
Linux:
yum install sshpass
Example of usage:
Ex:
sshpass -p test123 ssh root@192.168.1.1
Reafference:
https://stackoverflow.com/questions/32255660/how-to-install-sshpass-on-mac