New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
# For local account
AllowUsers username
# From
#PasswordAuthentication yes
# To
PasswordAuthentication no
command="& c:\scripts\perun\perun_connector.ps1 $input; exit $LASTEXITCODE" ssh-rsa publickey perun@idm.ics.muni.cz
- C:\Users\<USER>\.ssh\authorized_keys
(note that only perun user have rights for.ssh
folder and files see the official documentation of deploying the keys)
- C:\ProgramData\ssh\administrators_authorized_keys
Restart sshd service
Restart-Service sshd