在windows上安装好ssh server后,通过ssh连接到这台windows时默认使用的是cmd,如果想连接时就使用powershell可以通过以下方式:
以管理员身份运行命令:
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
转载自:
https://docs.microsoft.com/zh-cn/windows-server/administration/openssh/openssh_server_configuration