Score:1

SSH'ing into WIN 10

cn flag

People of the Server-verse, a humble hello from fellow apprentice.

Above line goes out to show i am a newbie and thus need help with trivial probs, so appreciate all help in advance.

I am facing 2 issues that need help with while ssh'ing into win 10 home edition pc from either a linux / macos.

  1. It still asks for password even though i copied my (linux/macos) id_rsa.pub key into authorized_keys file (of win10). Also to point out I copied the keys manually since ssh-copy-id was not working due to issue #2
  2. How do i change default shell when i log into win10, currently i am greeted with command prompt, as shown below, I have bash (WSL) and would like to have it default prompt when I ssh into it.

Microsoft Windows [Version 10.0.19042.1466]

(c) Microsoft Corporation. All rights reserved.

panda@DESKTOP-TEST C:\Users\panda>

Score:1
it flag

I presume you installed the Microsoft β-release of native openssh server?

Microsoft documentation explains how to deploy ssh keys using Powershell on serverside.

Nevertheless, in your still want bash:

2/ The shell provided by Microsoft can be configured adding a property in the registry:

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

You can also use a “bash” script to modify your %PATH% and add any flavor of third party bash you may have installed on the server (cygwin, msys, git-bash…).

1/ try again ssh-copy-id :) BUT keep in mind that only ed25519 keys may work. you@unix$ ssh-keygen -t ed25519 may save your day. Maybe not: I am unsure of the openssh implementation of Microsoft and the ACL management will probably prevent you from login in after the ssh key deployment if the ACLs (and their administrator_authorized_keys mechanism) is not correctly fixed.

BTW: the microsoft documentation are pretty clear. https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration and https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement

Ankit Rana avatar
cn flag
i got the bash to open up on SSH part working, however looking at the resources from MS web links (thank you for those) it is not only ed25519 that works, i will update once i get that tried out
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.