-
Notifications
You must be signed in to change notification settings - Fork 778
Documentation On Setting Up Users for SSH #381
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
Comments
@DarwinJS I just encountered this problem too. Is there any way to activate a user so that you don't have to login with password first, but can start using publickey auth right off the bat? |
@friism - I have not actually tested any of my conjecture in the first post of this issue. I was hoping for a statement from the Dev team (@manojampalam) on this ticket as to what SSH expects when the first (and possibly only) reason someone is creating a user is so they can use SSH. I do know that proper user creation creates many of the necessary objects, but that the user profile folder creation does not happen until the first windows logon. I also don't know if the very first user logon is via SSH - does SSH trigger the normal user profile creation - or do something else. |
@DarwinJS I got it mostly working, except for the first password to login: https://github.com/friism/ec2-windows-packer-ssh |
related to #478 |
I have fully password-less SSH working on EC2 now: https://github.com/friism/ec2-windows-packer-ssh |
OpenSSH works the same as any other user creation in Windows. If more info is needed, please submit a issue on the docs page: https://docs.microsoft.com/windows-server/administration/openssh/openssh_overview |
Some special procedures for pushing keys are mentioned here: #341
Since this procedure requires use of a password the first time, I am assuming a windows user must be created.
It will be easy, especially for Nano, for people to assume they can simply create a folder with the user's name and drop the keys in. (yep, I tried that ;)
However, if a proper userid creation is done, followed by a logon and Windows profile creation, Windows may create a new profile folder for that user because it finds the folder name with the user id is taken.
It is unclear is SSH searches the registry to find user => home directory mapping or if it will assume \userid (which would not be what windows thinks if the above scenario happens.
It would be great to have a guide on how to setup users - with special attention to systems where the only reason to setup a user is for SSH access.
It would be great if this guide included powershell code for user creation since that's the only way to create a full on windows user on core and Nano.
The text was updated successfully, but these errors were encountered: