System Administration >
Configuration
>
Fabric
>
Nodes
>
User Management
>
Users
Add SSH public key to authorized_keys file for node user
Request:
Method:
POST
URI Path(s):
/api/v1/transport-nodes/{transport-node-id}/node/users/{userid}/ssh-keys?action=add_ssh_key
/api/v1/cluster/{cluster-node-id}/node/users/{userid}/ssh-keys?action=add_ssh_key
/api/v1/node/users/{userid}/ssh-keys?action=add_ssh_key
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
SshKeyProperties
+
SshKeyProperties
(
schema
)
Name
Description
Type
Notes
label
SSH key label (used to identify the key)
string
Required
password
Current password for user (required for users root and admin)
string
type
SSH key type
string
Required
Pattern: "^(ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521|ssh-dss|ssh-ed25519|ssh-rsa)$"
value
SSH key value
string
Required
Example Request:
POST https://<nsx-mgr>/api/v1/node/users/10000/ssh-keys?action=add_ssh_key { "label": "user1@domain1", "type": "ssh-rsa", "value": "AAAAB3NzaC1yc2EAAAABIwAAAIEAywWhrwq4FjHt+UuwZcZePxtjtZOENFpOjufycaYso2nTlzNwnAQEQRfbqsUxKVtOtGxgApIkUvjRIjNBdJE6iOzvBXZhhJrM0GUDJragw7SMVIs/5xJBGAyHKJ1YUMGO7+nJTmsCLx6PFOlQYveuriiVVCCZerGCLH+UtSXK3z+l7hx9NiDg3/ylOLc3f3SLxrJKn0gMTgK7BHJFXo4PguuPjWZLVdUDX+XKiqtT2n4IsYs6N9qVFG3zUgNlEjZM47NK/ytAC0max98pK+QNzsuaQOo/IShJ1TOw5wwScflPArVJ2AyROqAe7cfQg7q12I9olASFd3U5NazfZCTYAvWA1kz9UZEWLJ1Br1XOkPqOleMM8KCp/PXzz8H0kISkMIji0/QuiZOPEBsKlszXjlALcXR8Mg1uiZVWy48i9JheyXyj1ToCj6cPScpgFHp3DAGSlKKbE1EFaVfeeyGAnHESuXC9wkSeFZCEyMJ+RgJxMkBXNZmyycbwsSqAeGJpMEUDlwzu2GD0obBz0HXqg9J1Xallop5AVDKfeszZcc=", "password": "Pa$$w0rd" }
Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a
Required Permissions:
crud
Feature:
system_administration
Additional Errors:
404 Not Found
301 Moved Permanently
307 Temporary Redirect
400 Bad Request
403 Forbidden
409 Conflict
412 Precondition Failed
500 Internal Server Error
503 Service Unavailable