SSH Key-based Login to Avi Controller

Starting with release 16.3, Avi Vantage provides a mechanism to manage public keys whereby the admin user may login with the SSH rather than username-password credentials.  This article describes the CLI and REST API interfaces involved.

Using the Command Line Interface

To upload a key:

>upload adminkey public_key "<public key>"

To delete a specific key:

>delete adminkey public_key "<public key>"

To delete all the keys:

>delete adminkey

Using the REST API 

To upload a key:

POST https://<controller-ip>/api/adminkey JSON data: {"key":"<public key>"}

To delete a specific key:

DELETE https://<controller-ip>/api/adminkey?key=<public key>

To delete all the keys:

DELETE https://<controller-ip>/api/adminkey?key