SSh server key

<< Click to Display Table of Contents >>

Navigation:  Managing Syncplify.me Server! > REST API > Admin API > Utility Functions >

SSh server key

Manages/creates/gets information about SSH server keys.

 

Request

Method

URL

POST

/smserver-default/sms.SSHServerKey

RAW

POST /smserver-default/sms.SSHServerKey HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

Content-Type: application/json; charset=UTF-8

Accept: */*

Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

 

[

       {

           "pki" : "-----BEGIN EC PRIVATE KEY-----\r\nMIHcAgEBBEIBnk8x2/+k1+RU+p8P2iqePwiPlR4WSYj9cF5ZGQRuymzWcIiQw0sN\r\nye4KQY8TxU8dzhfNOgH0mIzO5Oe0Rhx99h0wezOmFlM/NCF13iJdmFx8SdAD/c2tm6Onmw==\r\n-----END EC PRIVATE KEY-----\r\n"

       }

 

]

Explained

"Command": "info"

 

Retrieves meta-information about an SSH server key.

 

Response

Method

URL

RAW

Accept-Encoding: synlz,gzip

Content-Type: application/json; charset=UTF-8

 

 

{"result":[

{

       "PKI" : "-----BEGIN EC PRIVATE KEY-----\r\nMIHcAgEBBEIBnk8x2/UUKU7vrH3I906FzTTgv/rMT1Tv3llRV375URlg5dqvru4z\r\r\nye4KQY8TxU8dzhfNOgeePCywezOD1uAimFlMi2\r\nw+HglUXnzc9b3iJ/NCF13iJdm/c2tm6Onmw==\r\n-----END EC PRIVATE KEY-----\r\n",

       "Hash" : "3cfe10254478629f793dd9c9ab948f5ecbabe97f",

       "KeyLength" : "521 (~ RSA 15,360)",

       "PubKey" : "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBABBimQlzOwkqM3lIY4VqJwVN2+k1+RU+p8P2iqePwiPlR4WSYj9cF5ZGQRuymzWcIiQw0sNye4KQY8TxU8dzhfNOgH0mIzO5Oe0RhADx99h0cefeTuheePCywezOD1uAimFlMi2w+HglUXnzc9b3iJ/NCF13iJdmFx8SdAD/c2tm6Onmw==\n",

       "KAlg" : "ECDSA"

   }

],"id":772674711}

Explained

Returns the full server key as well as:

Hash: a unique fingerprint that identifies the server key itself.

PubKey: the public key (that can be given to clients)

KeyLength: the length (or equivalent length) of the key, already in string format

KAlg: the key algorithm ("RSA", "DSA", "ECDSA")

 

 

OR

 

Request

Method

URL

POST

/smserver-default/sms.SSHServerKey

RAW

POST /smserver-default/sms.SSHServerKey HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

Content-Type: application/json; charset=UTF-8

Accept: */*

Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

 

[

{

           "command" : "generate",

           "keyLength" : 521,

           "KAlg" : "ECDSA"

       }

]

Explained

"Command": "generate"

 

Creates a new SSH server keys.

 

Response

Method

URL

RAW

Accept-Encoding: synlz,gzip

Content-Type: application/json; charset=UTF-8

 

 

{"result":[

{

       "Result" : 1,

       "KeyLength" : "521",

       "ServerKey" : "-----BEGIN EC PRIVATE KEY-----\r\nMIHbAgEBBEE70JoDag1mJVV5DTeYF5kRoi3CtMwDET+l8G3Z91zfaDEcuzLQmr2i\r\nNDQB8jN9TU4ONalD+pS4Qs1SQPu1KXmztqAHBgUrgQQAI6GBiQOBhgAEAZr87YTO\r\n8nwjdtQWx0qgcH96T94M3N7EEckGBjtvHVnVub3eWtk/RYMTLIvM/EF2QO5CitMw\r\nJV680jmVvK8tZPYmATxSfmUmdQV8lJe5cJ9JnnuIIz12Ki6sNUg9evKZAFdBc5ZX\r\nCsJ62J7zu/T74+VQq4f0Ww7nltm56jjsDnnap3E/\r\n-----END EC PRIVATE KEY-----\r\n",

       "KAlg" : "ECDSA"

   }

],"id":772674711}

Explained

Returns the full server key that was generated as well as:

Hash: a unique fingerprint that identifies the server key itself.

PubKey: the public key (that can be given to clients)

KeyLength: the length (or equivalent length) of the key, already in string format

KAlg: the key algorithm ("RSA", "DSA", "ECDSA")