#MERCURIAL WINDOWS SSH KEY UPDATE#
UPDATE 3: The output of ssh -vvv when logging into the machine. UPDATE 2: Having tried switching the order of the keys in ~/.ssh/authorized_keys, with the forced-command key first, this appears to not be the case. Perhaps it is not possible to specify which key should be used, and that ssh just tries keys in order in ~/.ssh/authorized_keys till something works.
![mercurial windows ssh key mercurial windows ssh key](https://user-images.githubusercontent.com/183966/30785860-d779f3a6-a175-11e7-9a67-9eb5af8cccfe.png)
The first is the "regular" key, the second is the forced-command key. Here are the relevant stanzas client-side in. From the output of ssh -vvv the "regular" key is being used. The regular key is listed first, and the forced-command key second in ~/.ssh/authorized_keys. One of these is set up as a regular key in ~/.ssh/authorized_keys. Stack Exchange automatically produced this related question that I asked in 2011 and forgot about, so it looks like I got this command from this answer of I have two keys for the same local-remote combination. mindepth 1 -maxdepth 4 -type d -exec /usr/bin/hg-ssh + I've used this for a while, and my recollection is that it used to exit immediately if I used this key to try to log in.
![mercurial windows ssh key mercurial windows ssh key](https://www.antirandom.com/wp-content/uploads/2020/03/gpg-ssh-windows10native.jpg)
However, I must be doing something wrong, because I can actually log in with this key. This forced command is designed to just allow pushes with hg. I'm using the following as a forced command with hg-ssh.