SSH offers different forms of authentication, including passwords and public keys. Password authentication is still widely used, especially with network equipment. To avoid typing passwords for each connection, you can use a tool called sshpass, or its variant passh. However, this approach is a bit fragile and requires parsing the output of the ssh command. Since OpenSSH 8.4, you can use SSH_ASKPASS and SSH_ASKPASS_REQUIRE instead to simplify the process. Another improvement is to use different password entries based on the remote host. Overall, SSH authentication can be complex, particularly when it comes to compatibility with different vendors and authorization methods. It’s important to ensure that passwords are not exposed and are handled securely.
https://vincent.bernat.ch/en/blog/2023-sshpass-without-sshpass