Get-SCXSSHCredential

Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager

Get-SCXSSHCredential

Creates a privileged credential, by using the Secure Shell (SSH) protocol, for management operations on UNIX and Linux computers.

Syntax

Parameter Set: Default
Get-SCXSSHCredential [-Username] <String> [-ElevationType <String> ] [-SSHKey <String> ] [ <CommonParameters>]

Detailed Description

The Get-SCXSSHCredential cmdlet creates a credential for use in privileged UNIX or Linux SSH agent management operations.

Parameters

-ElevationType<String>

Specifies the elevation method, either "su" or "sudo", that elevates the supplied credential to a privileged account on the UNIX or Linux computer. If left unspecified, the cmdlet treats the credential that is used to create the SSH connection as privileged. If ElevationType is "su", a root password must be provided for the SuPassword parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SSHKey<String>

Specifies the file name, including its path, of an SSH key. The SSH key file must be in PuTTY key format. This parameter is required unless a password is specified.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Username<String>

Specifies the user name for an SSH connection.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Unix.SSHCredential

    This cmdlet returns the SSHCredential object as output.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This command creates a privileged SSH credential with a user name and prompts for a password.

C:\PS>Get-SCXSSHCredential -UserName root
Password:  *************

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This command creates a low-privileged credential with a user name and “su” elevation type. It then prompts for a password for the low-privileged account and the “su” password for the elevation.

C:\PS>Get-SCXSSHCredential -UserName joe -ElevationType su
Password:  *************
Su Password: *************

-------------------------- EXAMPLE 3 --------------------------

Description

-----------

This command creates a credential with a low-privileged account with a user name and a “sudo” elevation type. It then prompts for a password for the low-privileged account.

C:\PS>Get-SCXSSHCredential -UserName joe -ElevationType sudo
Password: *************

-------------------------- EXAMPLE 4 --------------------------

Description

-----------

This command creates a privileged credential with a user name and an SSH key. It then prompts for a passphrase. If a passphrase was not configured with the SSH key, just press Enter.

C:\PS>Get-SCXSSHCredential -UserName root -SSHKey c:\keys\admin.ppk
Key Passphrase: *************

-------------------------- EXAMPLE 5 --------------------------

Description

-----------

This command creates a low-privileged credential with a user name, an SSH key, and a “su” elevation type. It then prompts for the “su” password and a key passphrase.

C:\PS>Get-SCXSSHCredential -UserName joe -SSHKey c:\keys\userJoe.ppk -ElevationType su
Su Password: *************
Key Passphrase:

-------------------------- EXAMPLE 6 --------------------------

Description

-----------

This command creates a low-privileged credential with a user name, an SSH key, and a “sudo” elevation type. It then prompts for a key passphrase.

C:\PS>Get-SCXSSHCredential -UserName joe -SSHKey c:\keys\userJoe.ppk -ElevationType sudo
Key Passphrase: