Skip to content

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

Closed
DarwinJS opened this issue Oct 21, 2016 · 6 comments
Closed

Documentation On Setting Up Users for SSH #381

DarwinJS opened this issue Oct 21, 2016 · 6 comments

Comments

@DarwinJS
Copy link

DarwinJS commented Oct 21, 2016

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.

@friism
Copy link

friism commented Nov 13, 2016

@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?

@DarwinJS
Copy link
Author

@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.

@friism
Copy link

friism commented Nov 15, 2016

@DarwinJS I got it mostly working, except for the first password to login: https://github.com/friism/ec2-windows-packer-ssh

@manojampalam
Copy link
Contributor

related to #478

@friism
Copy link

friism commented Jan 12, 2017

I have fully password-less SSH working on EC2 now: https://github.com/friism/ec2-windows-packer-ssh

@maertendMSFT
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants