PHP Class Platformsh\Cli\Command\SshKey\SshKeyAddCommand

Inheritance: extends Platformsh\Cli\Command\CommandBase
Show file Open project: commerceguys/platform-cli

Protected Methods

Method Description
configure ( )
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
getNewKeyPath ( integer $number = 1 ) : string Find the path for a new SSH key.
keyExistsByFingerprint ( string $fingerprint ) : boolean Check whether the SSH key already exists in the user's account.

Method Details

configure() protected method

protected configure ( )

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

getNewKeyPath() protected method

If the file already exists, this will recurse to find a new filename. The first will be "id_rsa", the second "id_rsa2", the third "id_rsa3", and so on.
protected getNewKeyPath ( integer $number = 1 ) : string
$number integer
return string

keyExistsByFingerprint() protected method

Check whether the SSH key already exists in the user's account.
protected keyExistsByFingerprint ( string $fingerprint ) : boolean
$fingerprint string The public key fingerprint (as an MD5 hash).
return boolean