使用 PowerShell 安装 OpenSSH

使用 PowerShell 安装 OpenSSH

如何ssh使用?

**********************
Windows PowerShell transcript start
Start time: 20200325223558
Username: DESKTOP-9AKB65V\thufir
RunAs User: DESKTOP-9AKB65V\thufir
Configuration Name: 
Machine: DESKTOP-9AKB65V (Microsoft Windows NT 10.0.18362.0)
Host Application: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
Process ID: 6760
PSVersion: 5.1.18362.628
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.18362.628
BuildVersion: 10.0.18362.628
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\Users\thufir\Documents\PowerShell_transcript.DESKTOP-9AKB65V.zPzBA4kd.20200325223558.txt
PS C:\Users\thufir> Ssh [email protected] 2220
Ssh : The term 'Ssh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Ssh [email protected] 2220
+ ~~~
    + CategoryInfo          : ObjectNotFound: (Ssh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
Ssh : The term 'Ssh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Ssh [email protected] 2220
+ ~~~
    + CategoryInfo          : ObjectNotFound: (Ssh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\thufir> echo "Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'"
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
PS C:\Users\thufir> Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'


Name  : OpenSSH.Client~~~~0.0.1.0
State : Installed

Name  : OpenSSH.Server~~~~0.0.1.0
State : NotPresent



PS C:\Users\thufir> stop-transcript
**********************
Windows PowerShell transcript end
End time: 20200325224124
**********************

是否未按照以下方式安装:

https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse

相关内容