Skip to main content
Notice removed Authoritative reference needed by CommunityBot
Bounty Ended with rhermans's answer chosen by CommunityBot
edited title
Link
sam wolfe
  • 5k
  • 11
  • 45

How to access ana password-protected ssh server using PowerShell in Mathematica?

added 128 characters in body; edited title
Source Link
sam wolfe
  • 5k
  • 11
  • 45

How to useaccess an password-protected ssh server using PowerShell in Mathematica?

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

enter image description here

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?

How to use PowerShell in Mathematica?

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

enter image description here

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]"]

I am also aware of this question, but it does not really help me. Any ideas?

How to access an password-protected ssh server using PowerShell in Mathematica?

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

enter image description here

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?

Tweeted twitter.com/StackMma/status/1589950887891505152
Notice added Authoritative reference needed by sam wolfe
Bounty Started worth 300 reputation by sam wolfe
Source Link
sam wolfe
  • 5k
  • 11
  • 45

How to use PowerShell in Mathematica?

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

enter image description here

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]"]

I am also aware of this question, but it does not really help me. Any ideas?