windows設置sshd的shell

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force

設置完需要重啓一下sshd

如果想用ssh-copyid, 需要把 c:/programData/ssh/sshd_config 最下面兩行註釋掉


#Match Group administrators
#       AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys

如果需要使用ssh-agent 連接到win server的sshd,暫不支持

如果需要使用ssh-agent 連接到win server的sshd, 需要使用較新版本的win openssh ,時間點參照下面這個isuee

https://github.com/PowerShell/Win32-OpenSSH/issues/1865

除此之外 ,不要忘記本來就應該的打開轉發

AllowAgentForwarding yes

AllowTcpForwarding yes

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章