我已经下载了"openSSH 64",所以我可以使用PowerShell将ssh放到Linux服务器中。
如果我进入文件夹并调用ssh.exe,它就能工作。我不想每次需要使用SSH时都进入文件夹。
我试过本教程,但它不起作用。在powershell上键入ssh时,我会得到以下错误:
ComSpec : The term 'ComSpec' is not recognized as the name of a cmdlet, function, script file, or operable program.问题:
如何创建变量路径或其他内容,因此每次在PowerShell中键入PowerShell时,它都会自动调用此可执行文件C:\Users\druml\Downloads\OpenSSH-Win64\OpenSSH-Win64\ssh.exe。
更新:
我能够在命令行(命令行,cmd)上工作,而不是使用PowerShell。在我的例子中,我确实需要使用PowerShell。
发布于 2017-07-04 06:53:46
我能够通过以下方式做到这一点:https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10
添加新变量后,确保像@J. Bergmann提到的那样重新启动@J. Bergmann。
https://stackoverflow.com/questions/44898299
复制相似问题