VMware NSX
VMware NSX-T Datacenter
To allow root SSH access after deployment.
> set ssh root-loginCheck it is enabled, you can see Root login status is enabled below:
> get service ssh
Service name: ssh
Service state: running
Start on boot: True
Root login: enabled> clear ssh root-login> get service ssh
Service name: ssh
Service state: running
Start on boot: True
Root login: disabledNote: If SSH to the NSX manager fails as admin also, the SSH service on the manager may be stopped.
There are three option to enable/start SSH, using central CLI on NSX manager or API to the NSX manager or vCenter console.
get nodeson <node-uuid> exec get service sshon <node-uuid> exec start service sshon <node-uuid> exec get service sshPOST /api/v1/node/services/ssh?action=startPOST /api/v1/transport-nodes/{transport-node-id}/node/services/ssh?action=start'GET /api/v1/transport-nodes' can be used to find the edge node UUID. For edges, the API can be sent to any manager, for managers, send the API to the manager you wish to start the SSH service on.start service sshget service ssh to ensure service state shows as running. You can now SSH and connect to the NSX manager command line interface.Note: Accessing NSX nodes via root is under direction from Broadcom, such as the purposes of this KB.
To switch to the root user via admin cli, login to the NSX manager as admin and run the command below and enter the root password:
> st en
Password:Note: To be able to connect to the NSX manager via WinSCP as user root, you need to enable the direct root login as per the steps mentioned above, you can not use admin for WinSCP.