I want to run Windows PowerShell commands via Mathematica. Specifically, I need to access a ssh server which is password-protected. When I do this using the PowerShell, I get the following prompt
where I can then type my password. However, while using RunProcess in Mathematica, I do not get any password requests and the evaluation does not end. Any way around this?
Here is my code, which works for any other PowerShell commands, inspired by this post,
shell[s_] := RunProcess[{"powershell", s}, "StandardOutput"]
shell["ssh [user]@[domain]"]
for which the second evaluation does not end. How can I overcome this, somehow introducing the password, and access the server? I am also aware of this question, but it does not really help me. Any ideas?
Update: The server has now imposed a Multi-Factor Authentication (MFA) process for which I need to introduce an OTP (following the password), adding to the problem. However, I think a solution to the first issue might potentially also fix this. Any ideas?

ssh user@domain commanddirectly, and do not use PowerShell. Recent versions of Mathematica even have built-in tools to make this much simpler, see e.g.RemoteRunProcess[]. $\endgroup$RemoteRunProcess. It works great. You have to make sure to add your private key to the ~/.ssh/authorized_keys file in the server. I can expand but this is not the question as it doesn't use PowerShell. $\endgroup$FileNameJoin[{$UserBaseDirectory, "ApplicationData", "SecureShellLink", "Keys"}]to a file named authorized_keys in the .ssh directory in your home directory in the server. It is just one line so you can just copy and paste it or doecho "the key" >> ~/.ssh/authorized_keys$\endgroup$