我正在尝试使用freeSSHd从Linux框中运行Powershell脚本。我已经安装并配置了freeSSHd来进行无密码身份验证。
当我运行ssh来执行powershell时,它给了我预期的输出,但是卡住了,即,我没有得到提示。
ssh me@my_windows_box 'powershell C:\Users\gkr\Desktop\my_ps_script.ps1 arg1'
我在这里做错了什么?
诀窍是将-inputformat none
开关添加到powershell。在这里找到
所以ssh命令应该看起来像这样
ssh me@my_windows_box 'powershell -inputformat none C:\Users\gkr\Desktop\my_ps_script.ps1 arg1
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句