If using the zapper iot provision image (Ubuntu Core) to machine and using the console-conf to setting the profile.
We should use the ce-certification-qa email, once machine setting is done, the ssh key already in the DUT.
The agent already have the access to the DUT.
https://github.com/canonical/testflinger/blob/main/device-connectors/src/testflinger_device_connectors/devices/zapper_iot/__init__.py#L79-L82
def _post_run_actions(self, args):
"""Run further actions after Zapper API returns successfully."""
self._copy_ssh_id()
If using the console-conf, there is no local password in it.
If still run self._copy_ssh_id(), the sshpass -p <test_password> ssh-copy-id ce-certification-qa@<DUT IP> will be run, and the return code will be non-zero.
$ sshpass -p <test_password> ssh-copy-id ce-certification-qa@<DUT IP>
$ echo $?
> 6
Related with this PR: #446