首页 > 解决方案 > ssh:术语“ssh”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称

问题描述

我尝试使用 ssh 连接到服务器,但出现以下错误 ssh:

The term 'ssh' is not recognized as the name of a cmdlet, function, script file, or operable program.

我已按照https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse#:~:text=Install%20OpenSSH%20using%20PowerShell.%20To%20install%20OpenSSH%的教程进行操作20使用,%20以下%20输出%20如果%20都没有%20是%20已经%20安装%3A

并设法安装 OpenSSH.client 和服务器,但在尝试运行 ssh 时出现同样的错误。

在此处输入图像描述

我在 Windows 10 专业版上运行。我尝试卸载 OpenSSH 并重新安装,重新启动计算机,但没有任何改变。

编辑: 以一种奇怪的方式,ssh 第二天就开始工作了。我想解决方案是在卸载并重新安装 ssh 后重新启动计算机。

标签: sshopenssh

解决方案


首先在新的 Powershell Windows中尝试相同的命令,该命令将继承您刚刚通过安装OpenSSH for Windows所做的系统更改

确保您确实看到了C:\Windows\System32\openssh\ssh.exe.

如“ Windows 10 的 OpenSSH 服务器配置”中所述

首先确认OpenSSH安装文件夹在系统路径上。

对于 Windows,默认安装文件夹是SystemDrive:WindowsDirectory\System32\openssh.


推荐阅读