/api/login/public-key/:token
Send the public key to the server during authentication
Method
POST
Parameters
- publicKey — base64 encoded string public key of the ssh key. The format of the string is as follows
4 bytes – unsigned int: length X of string to come
X bytes – string: this will be ‘ssh-rsa’ (7 chars)
4 bytes – unsigned int: length Y of byte array
Y bytes – bigint of ‘e’
4 bytes – unsigned int: length Z of byte array
Z bytes – bigint of ‘n’
Result
Stage: sign
User is in the middle of authentication.
Sign the data with the private key and send to the server
- stage — ‘sign’
- token — connection token which is required during authentication
- signData — base64 encoded data to sign with the public key
Stage: public-key
User is in the middle of authentication.
Send the public key to the server
- stage — ‘public-key’
- token — connection token which is required during authentication
Stage: keyboard-interactive
User is in the middle of authentication.
The prompts parameter contains an array of prompts that the user should make responses to. Send the array of responses to /api/login/keyboard-interactive/:token
- stage — ‘keyboard-interactive’
- token — connection token which is required during authentication
- prompt — text description of the prompt
Stage: password
Password based authentication
JSON object with the following members
- stage — ‘password’
- token — connection token which is required during authentication
Stage: success
User has successfully logged in and can now issue api commands
JSON object with the following members
- stage — ‘success’
- token — connection token which is required in api calls
- host — hostname where the user is connected