8000 adding ssh support for both linux and windows by jackyalbo · Pull Request #3 · CatalystCode/pkgcloud · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@jackyalbo
Copy link
Collaborator

will support win32-openssh for windows and will add default user to
sudoers for linux

also some cosmetic fixes of beautify - sorry about those...

will support win32-openssh for windows and will add default user to
sudoers for linux
@jackyalbo jackyalbo requested a review from morsh March 15, 2017 13:22
$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'))
Copy link
Collaborator

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'
}),
Copy link
Collaborator

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"

Copy link
Collaborator Author

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',
Copy link
Collaborator
< 8000 div class="js-minimize-comment d-none">

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

Copy link
Collaborator Author

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

Copy link
Collaborator
@morsh morsh left a 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

@morsh morsh merged commit 4dec2ec into master Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0