I am trying to send a command from Python's os.system() to MS PowerShell. While other commands work as expected the ssh commands are treated as string inputs and do not work when invoked through os.system().
The normal expected output is:
Is there anything that can be done to "force" PowerShell to treat these as normal commands?
OpenSSH is located in System32 directory on Windows 10 and appropriately added to system and user paths.
Python Code (this fails)
import os
os.system('powershell ssh-keygen -R 192.168.2.2')
PowerShell Command (this works)
ssh-keygen -R 192.168.2.2