I realize this question has been asked a few times but I could not find a relevant answer anywhere in my searching.
I am working in a development environment where s
Use sshpass which is available in package repositories on major Linux-es.
For example, when password is in password.txt file:
password.txt
sshpass -fpassword.txt ssh username@hostname
sshpass runs ssh in a dedicated tty, fooling it into thinking it is getting the password from an interactive user.
sshpass
ssh
tty