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.
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.
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.
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.
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.
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.
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.
it is used by linux - see the previous comment
morsh
left a comment
There was a problem hiding this comment.
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...