Here is the command and message in cloudmonkey. The VM is connected with the ssh-key-pair with the name 'myname'
(bicrxm) 🐱 > reset sshkeyforvirtualmachine account=admin domainid=a7509cc5-d50e-11eb-afe0-646e69d9cd09 keypair=myname id=c9e37866-2314-46f8-8741-9b2d045ad40a keypairs=myname { "accountid": "a751fb3a-d50e-11eb-afe0-646e69d9cd09", "cmd": "org.apache.cloudstack.api.command.admin.vm.ResetVMSSHKeyCmdByAdmin", "completed": "2021-06-25T12:24:47+0530", "created": "2021-06-25T12:24:45+0530", "jobid": "53db8eca-cf4c-4eb6-a9f2-a37d54af0f7d", "jobinstanceid": "c9e37866-2314-46f8-8741-9b2d045ad40a", "jobinstancetype": "VirtualMachine", "jobprocstatus": 0, "jobresult": { "errorcode": 530, "errortext": "Caught: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT ssh_keypairs.id, ssh_keypairs.account_id, ssh_keypairs.domain_id, ssh_keypairs.keypair_name, ssh_keypairs.fingerprint, ssh_keypairs.public_key FROM ssh_keypairs WHERE ssh_keypairs.account_id = 2 AND ssh_keypairs.domain_id = 1 AND ssh_keypairs.keypair_name = ** NOT SPECIFIED ** ORDER BY ssh_keypairs.keypair_name DESC " }, "jobresultcode": 530, "jobresulttype": "object", "jobstatus": 2, "userid": "a781b145-d50e-11eb-afe0-646e69d9cd09" } 🙈 Error: async API failed for job 53db8eca-cf4c-4eb6-a9f2-a37d54af0f7d (bicrxm) 🐱 >