abstract class OpenSSH (View source)

OpenSSH Formatted RSA Key Handler

Properties

static protected string $comment Default comment
static protected bool $binary Binary key flag

Methods

static 
setComment(string $comment)

Sets the default comment

static array
load(string $key, string $password = '')

Break a public or private key down into its constituent components

static 
setBinaryOutput(bool $enabled)

Toggle between binary and printable keys

static string
wrapPrivateKey(string $publicKey, string $privateKey, string $password, array $options)

Wrap a private key appropriately

Details

static setComment(string $comment)

Sets the default comment

Parameters

string $comment

static array load(string $key, string $password = '')

Break a public or private key down into its constituent components

$type can be either ssh-dss or ssh-rsa

Parameters

string $key
string $password

Return Value

array

static setBinaryOutput(bool $enabled)

Toggle between binary and printable keys

Printable keys are what are generated by default. These are the ones that go in $HOME/.ssh/authorized_key.

Parameters

bool $enabled

static protected string wrapPrivateKey(string $publicKey, string $privateKey, string $password, array $options)

Wrap a private key appropriately

Parameters

string $publicKey
string $privateKey
string $password
array $options

Return Value

string