Support Center

System SSH Configuration Tools

In order to make changes to existing systems' ssh settings at scale, below are examples of two tools that allow for finding any system based on filter parameters, and then setting the desired parameters. In both examples we're filtering on the following settings:

allowSshPasswordAuthentication
allowPublicKeyAuthentication
allowMultiFactorAuthentication

Depending on the current settings of the system, one or more parameters may need to be set to false. In both examples, any system found will be set to only require public key authentication unless the parameter values are changed. 

PowerShell Module

See the Support Wiki for PowerShell Module basics.
Get-JCSystem -allowSshPasswordAuthentication $true -allowMultiFactorAuthentication $true -allowPublicKeyAuthentication $true | Set-JCSystem -allowSshPasswordAuthentication $false -allowMultiFactorAuthentication $false -allowPublicKeyAuthentication $true
To change the filter parameters, set one or more boolean values to false on the Get-JCSystem side of the operation. To change the settings being applied, set one or more of the boolean values on the Set-JCSystem side of the operation. Results are printed to screen.
  
Bash

setSshParams.sh

To change the filter parameters, set one or more boolean values to false within the getSystems function. To change the settings being applied, set one or more of the boolean values in the putSystemParams function. When the script runs, a file called 'results' will be generated in the current working directory containing the output of the API call in putSystemParams. This will allow for checking that changes were made as expected.
 

Last Updated: Aug 01, 2018 01:46PM MDT

Related Articles
desk-forwarding@jumpcloud.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete