Skip to content
Snippets Groups Projects
Commit f956e3b0 authored by Luis Araujo's avatar Luis Araujo
Browse files

Remove the usage of ssh-copy-id script


And instead just copy the SSH key directly using scp command.

Signed-off-by: default avatarLuis Araujo <luis.araujo@collabora.co.uk>
parent 0c7a9d45
No related branches found
No related tags found
1 merge request!195Merge pending fixes to the psdk test
......@@ -51,7 +51,7 @@ class PsdkCommands(object):
else:
_run_command(cmd, ssh, output)
def _ssh(self, lst=[], copy_id=False, copy_file=False):
def _ssh(self, lst=[], copy_file=False):
ssh_opts = [ "-o", "StrictHostKeyChecking=no",
"-o", "UserKnownHostsFile=/dev/null",
"-o", "LogLevel=ERROR" ]
......@@ -59,8 +59,7 @@ class PsdkCommands(object):
return [ "scp", "-i", self.ssh_id_file,
"-P", self.local_port ] + ssh_opts + lst
else:
cmd = "ssh-copy-id" if copy_id else "ssh"
return [ cmd, self.local_host, "-i", self.ssh_id_file, "-p",
return [ "ssh", self.local_host, "-i", self.ssh_id_file, "-p",
self.local_port ] + ssh_opts + lst
def create_vm(self, vm):
......@@ -133,7 +132,8 @@ class PsdkCommands(object):
self._run([ self.vbox_manage, "unregistervm", vm, "--delete" ])
def copy_ssh_key(self):
self._run(self._ssh(copy_id=True), ssh=True)
kdir = (self.local_host + ":/home/user/.ssh/")
self._run(self._ssh(["-rp", "ssh/", kdir], copy_file=True), ssh=True)
def clean(self):
print("Cleaning environment ...")
......
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEJw7Nz6/jghVPCZa+8MFTajN4vUZh3aukPeonmlp6RYwIvnnDBWBxBQpRyhfRsNDAMsSvmmH4AL9eaEbCNUgMQbw2oYKup28Qe65gizyfnJE69fuxZ++XCHemvbE7s9II/V1LxGSH2wkjliM0/uKHXzZap2pJdwbWwDm/vQAVLUNR/kYiMUg50niRKZsfUSvLF5m6CzcsH8ElbVegv+g96Eo+5+tIWO9E2PtMixcjLIJRNStU2Z2+OD6o1FZtK4gEPCUODCcjxYpYBDdGh6OdXINCShZdQwOrsfPPVCSknN4wxVedHeU6M+N8y4q3SBPsznY4nHr0+ghro+EM2PvF user@apertis
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment