Use the generate ssh keys API to generate new pair of keys.
HTTP Request
https://hostname:4085/index.php?act=create&generate_keys=1
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | create | The action specified to retrieve data | Yes |
Output
{
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD5zfj4jGDwtx5m.. root@lxc",
"private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEA+c34+Ixg8LceZs7bQUvUvS7m7GyRvz09a9A00gIwqaBdG0Hz\nEOo+6sdxAVdI8c3+LfhSQieQrxPmMjon0Obky/sF3YOwI+y09m6f6ZWcP+/raRnN\nb2I61EcfQJyoViYkzML3p6XAhP12qFJemATwqjtYAyygdZCzHtHJILZvyAQejeRd\nEj8ac1s8rVAw1B5TmxPMojyXgYsi0t9D8mIRCWuRHbxky0tcp6jA0U6HOyeB6SQp...\n-----END RSA PRIVATE KEY-----",
"path": "/var/virtualizor/ssh-keys/"
}