Connect to a remote server with the password supplied as an option, and automatically accept unknown ssh keys

sshpass

  • An ssh password provider.
    It works by creating a TTY, feeding the password into it, and then redirecting stdin to the ssh session.
    More information: <https://manned.org/sshpass>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sshpass -p {{password}} ssh -o StrictHostKeyChecking=no {{user}}@{{hostname}}

click the source code to copy install sshpass on any operating system with command-not-found.com