Back to product page

PublicKeyOpenSSH property


Returns public key in OpenSSH format.

Type

A String value.

Syntax

  • Basic
object.PublicKeyOpenSSH(KeyType)
The PublicKeyOpenSSH(object,KeyType) syntax has these parts:
objectAn expression evaluating to an object of type SSHKeyPair.
KeyTypeRequired. A SSHKeyTypes enumeration, as described in settings. Type of the key (RSA, DSA or ECDSA).

Remarks

The settings for KeyType are:

Constant Value Description
RSAkey0 Uses RSA cipher to create keys.
DSAkey 1 Uses DSA cipher to create keys.
ECDSAkey 2 Uses ECDSA cipher to create keys.

PublicKeyOpenSSH will return string information that represents stored public key in format suitable for OpenSSH servers. Typically, it will look like this:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA8AYkMFyO5RLtAtWh5/NeveIh4vv6l/p1V5gKhfnj8uz36KrEEMn..............

You can easily paste contents of this property to file on your server system that keeps public keys. Usually, this is -/.ssh/authorized_keys2 file.

Platforms

Windows