I have a Python script which leverages subprocess
to call MobaXterm and use it to run a command to my server through SSH. The script works fine when using the Windows Subsystem for Linux (WSL), but fails when using Moba. This is the code:
import subprocess
moba_path = "C:\Program Files (x86)\Mobatek\MobaXterm\MobaXterm.exe"
subprocess.run(f'{moba_path} -exec ssh my_server "mkdir test_dir"')
It opens the MobaXterm window but does not show any sign of command execution. I checked, and the command has not been executed (the folder has not been created).
Any ideas?