-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update OpenSSH key management #4788
Conversation
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very useful and properly updated to me.
Split diff view: https://github.com/MicrosoftDocs/windowsserverdocs/pull/4788/files?diff=split&w=1
#sign-off |
(Also looking forward to getting all those similar and related tickets closed.) |
The proposed changes will result in hundreds of thousands of developers who have Admin accounts and are trying to |
@therealkenc : Forgive me for not understanding the issue the way you see it, but are you saying that the proposed change is not useful in this context? If so, do you have a suggestion for what the proposed change should look like to make it useful? |
Thank you for the the comment @therealkenc, but is there any incorrect information in the PR? Feel free to point them out so I can fix them. If you read https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview in order, you'll come across https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse#initial-use-of-ssh which describes how to connect with a username and password, and you'll finish on "OpenSSH key management" |
The documentation (as modified with the PR) has:
This is despite the PR removing lines including:
In any case, the Deploying the public key section does not work for users in the Administrator group, because I followed some non-authoritative instructions found here. Which are:
Whether those instructions are appropriate or not I couldn't tell you. They did work here. The instructions as presented before or after this pull request do not. |
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Thanks for catching this @therealkenc, I've removed the Regarding users in the Administrator group, I can´t really say if that's the "official" way of doing it, since I don't actually work with Windows systems. Probably need a verification. |
Appreciated, thanks. But the proposed changes will result in hundreds of thousands of developers who have Admin accounts and are trying to To be clear, that's the common (not exceptional) case. Most every developer using Docker or WSL or Hyper-V to Since I am here, the statement at the top of the page doesn't make sense:
I don't know how that got in there, but there is no basis for the premise that Windows users, for reasons unexplained, prefer to enter a password every time they type |
WindowsServerDocs/administration/OpenSSH/OpenSSH_KeyManagement.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Trond B. Krokli <38162891+illfated@users.noreply.github.com>
Is there a way to switch User -> Administrator (e.g |
To move the contents of your public key (~\.ssh\id_ed25519.pub) into a text file called authorized_keys in ~\.ssh\ on your server/host. | ||
|
||
This example uses the Repair-AuthorizedKeyPermissions function in the OpenSSHUtils module which was previously installed on the host in the instructions above. | ||
To move the contents of your public key (~\.ssh\id_ed25519.pub) into a text file called authorized_keys in ~\.ssh\ on your server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ssh-copy-id
still not part of the Win32 port of OpenSSH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not on my Windows 10 installation at least.
Myself, I have only used the GUI method of "Run as administrator", but there are other suggestions found elsewhere:
|
@therealkenc : Sorry about the confusion. The documentation makes it look like RunAs is outdated and/or deprecated: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771525(v=ws.11) -- the command is available in Windows 10, though:
|
The confusion stems from the irrelevance of |
@konstruktoid : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
@konstruktoid : Thanks for your contribution! The author(s) have been notified to review your proposed change. |
So, does this mean that we are drawing closer to a conclusion? If so, that would be good news for final review & merge. Any remaining issues at the moment? |
Yes; the documentation as presented does not work for any user in the local Administrator group, because A user with admin privs will make it to the concluding sentence "After this, the user can connect to the sshd host from any client that has the private key" to find their keys do not work. |
Ok, fair enough. Thank you for the feedback. @konstruktoid : Do you have any thoughts on how to address that issue? |
Sorry I don't, that´s too much Windows for me. |
Fair enough. We should aim for a conclusion to this PR anyway. @therealkenc :: Is it fair to say that you are still opposed to the current PR and that you would like to make your own PR for the necessary changes, if you know what should be added to make it work for administrators like you? |
That question was answered in September: "Whether those instructions are appropriate or not I couldn't tell you." |
I reported https://github.com/MicrosoftDocs/windowsserverdocs/issues/5068 -- and I can confirm that some kind of permission fix is need and the state of the documentation before and after this PR is not functioning. The permissions of the |
I can confirm that the options listed in https://www.concurrency.com/blog/may-2019/key-based-authentication-for-openssh-on-windows and by @therealkenc worked for me |
FWIW: I spent 8 hours to debug this |
Thank you very much for the effort and for your feedback. That is both welcome and very worthwhile to us. |
Updated list of related issue tickets:
|
Will those issues be closed as well if this PR is merged? |
If you update your list of "Closes #xxxx" to include all of them, they should normally be closed, yes. Otherwise, they can be closed manually by commenting edit: The closing comment command feature has only been implemented in this repository (windowsserverdocs) as far as I know. edit 2: Maybe you know this already, but if you add more issue ticket numbers to your closing list, the text "May be fixed by #4788 " is added to the top of each page. |
Yeah, I should rephrase that. Are all those issues supposed to get closed by this PR? |
1 similar comment
Yeah, I should rephrase that. Are all those issues supposed to get closed by this PR? |
Oh. I see. Maybe, maybe not. I guess I was a bit hasty to draw the conclusion that the new ones are directly related. The tickets are from the same MS Docs page. |
Just to throw this in here, on 202H, the only thing I need to run is |
The instruction suggest a So far none of the 'proposed' steps have worked for me. |
But the keys in the |
Just out of curiosity. |
That is not what I refer to. The action describes a scp, while normally we add a key. This is also part of the responsibility of something like This is why overwriting the content with a copy will leave only one user remaining. It lacks explanation what the users should do. Note: message was prematurely sent. Was in the action of editing (while picking up the kid) |
Ah, @gbraad, that is true. The issue is I believe is that |
The following issue tickets (including both open and closed tickets) originate from the same document page as the one targeted by this PR:
Some of these may be not specific to this PR content, but I thought it would be useful to see how much attention this page has received since January 28, 2020 (more than a year ago). |
Thanks for this PR and to everyone for the conversation throughout. I have reworked this document to remove or replace parts that are no longer relevant or correct based on this PR and several other issues raised for this page. The changes have been done through a different PR, so I'm going to close this one. Please file new issues if needed. The changes should be visible in around 6-12 hours. #please-close |
Update the documentation regarding OpenSSH key management, and include instruction how to use
ssh-keygen.exe
.closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/2747
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/3400
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/3456
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/3806
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/3970
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4345
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4518
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4598
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4622
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4634
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4690
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4702
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4743
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4770
closes https://github.com/MicrosoftDocs/windowsserverdocs/issues/4787
Signed-off-by: Thomas Sjögren konstruktoid@users.noreply.github.com