Skip to content
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

vmss linux ssh for local admin enabled #1820

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

abdullahaslam306
Copy link
Contributor

No description provided.

domain: 'Compute',
description: 'Ensures that Azure Virtual Machine scale sets with Linux OS has SSH enabled.',
more_info: 'SSH is an encrypted connection protocol that allows secure sign-ins over unsecured connections. SSH is the default connection protocol for Linux VMs hosted in Azure.',
link: 'https://learn.microsoft.com/en-us/azure/virtual-machines/linux/ssh-from-windows',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

category: 'Virtual Machine Scale Set',
domain: 'Compute',
description: 'Ensures that Azure Virtual Machine scale sets with Linux OS has SSH enabled.',
more_info: 'SSH is an encrypted connection protocol that allows secure sign-ins over unsecured connections. SSH is the default connection protocol for Linux VMs hosted in Azure.',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

write an advantage of using SSH key.

var source = {};
var locations = helpers.locations(settings.govcloud);

async.each(locations.vmScaleSet, function(location, rcb) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have two resources in locations.js vmScaleSet and virtualMachineScaleSets, can you use virtualMachineScaleSets instead making it consistent, and also remove the other from locations file along with its usage

Comment on lines +36 to +39
if ((scaleSet.virtualMachineProfile.storageProfile && scaleSet.virtualMachineProfile.storageProfile.osDisk &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType.toLowerCase() === 'linux')){

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ((scaleSet.virtualMachineProfile.storageProfile && scaleSet.virtualMachineProfile.storageProfile.osDisk &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType.toLowerCase() === 'linux')){
if (scaleSet.virtualMachineProfile &&
scaleSet.virtualMachineProfile.storageProfile &&
scaleSet.virtualMachineProfile.storageProfile.osDisk &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType &&
scaleSet.virtualMachineProfile.storageProfile.osDisk.osType.toLowerCase() === 'linux'){

scaleSet.virtualMachineProfile.osProfile.linuxConfiguration.ssh){
helpers.addResult(results, 0, 'VM scale set for linux has SSH enabled', location, scaleSet.id);
} else {
helpers.addResult(results, 2, 'VM scale set for linux does not have SSH enabled', location, scaleSet.id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

produce the message according to ssh keys

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

Successfully merging this pull request may close these issues.

3 participants