-
Notifications
You must be signed in to change notification settings - Fork 0
adding ssh support for both linux and windows #3
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
Conversation
will support win32-openssh for windows and will add default user to sudoers for linux
| $securePassword = ConvertTo-SecureString $password -AsPlainText -Force | ||
| $credential = New-Object System.Management.Automation.PSCredential $username, $securePassword | ||
| Enable-PSRemoting -Force | ||
| $scriptPath = ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/DarwinJS/ChocoPackages/master/openssh/InstallChoco_and_win32-openssh_with_server.ps1')) |
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.
Maybe it would be better to add this file to the repo or have a fork of the original repo so there are no surprises if it changes in the original repo
| errs.create({ message: 'Azure\'s API is not rate limited' }), | ||
| errs.create({ | ||
| message: 'Azure\'s API is not rate limited' | ||
| }), |
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.
General remark - I guess you are "beautifying" the code - but this should be done separarately from major changes since I can't tell what are the real changes and what are "white spaces"
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.
it is beautify - sorry about that, but as i said the real changes are very small. I will disable it for future use on this project
| }]; | ||
| } else { // linux - make sure the new user is in sudoers - so he can sudo with no password | ||
| template.resources[vmIndex].resources = [{ | ||
| 'type': 'Microsoft.Compute/virtualMachines/extensions', |
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.
Why did you also add a linux extension? from what I remember ssh works by default on Linux machine
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.
It does work, but in none ubuntu linux by default the azure user is not a passwordless sudoer, it has to enter his password before sudoing - so this patch fixes that.
| @@ -0,0 +1,4 @@ | |||
| #!/bin/bash | |||
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.
Why add this file if it is not used? Did you mean to copy the original from DarwinJS/ChocoPackages?
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.
it is used by linux - see the previous comment
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.
Everything seems legit, please check
will support win32-openssh for windows and will add default user to
sudoers for linux
also some cosmetic fixes of beautify - sorry about those...