Closed tigerinus closed 1 year ago
If password authentication does not pass, the default-shell may not be working.
check path
https://docs.microsoft.com/ja-jp/windows-server/administration/openssh/openssh_server_configuration
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
If you are an ADD user, publickey authentication will not go through.
c:/programdata/ssh/sshd_config
PasswordAuthentication yes
PermitEmptyPasswords yes
If you are an ADD user and want to do publickey authentication, try the following steps.
c:/programdata/ssh/sshd_config
PasswordAuthentication no
PermitEmptyPasswords yes
AuthorizedKeysFile .ssh/authorized_keys
#Match Group administrators
# AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
c:users/xxx/.ssh/authorized_keys
ssh-rsa AAAAB/GO0K8+js= syui@github.com
@tigerinus, did the posted recommendations solve the issue?
@maertendMSFT - Thanks for the steps, which I am sure they work.
However it turned out that it was a bad mistake I did, that I forgot to run busybox --install
after installing a new version of busybox-w32. Because of this, the DefaultShell
I specified earlier does not exist:
I wouldn't be looking at this regkey if you didn't mention it. Thanks again for the info!
I figure it'd be nice that at the login prompt it gives some error about the missing DefaultShell
instead of asking for password repeatly, which is obviously misleading.
Prerequisites
Steps to reproduce
C:\ProgramData\ssh\sshd_config
ends up to be:ssh localhost
Expected behavior
Actual behavior
Error details
No response
Environment data
Version
8.9p1
Visuals
No response
Update 1
added following line to
sshd_config
Now when
ssh localhost
:I am very sure the password is correct.