Hm, it looks like a regular "Password:" OpenSSH prompt that should already be handled correctly, unless I'm missing something. Does this happen when you start Emacs as "emacs -Q" too? > > After that both the "ssh" command and the password were recorded into > the history. > > I hope this helps. >