Skip to content

Commit 05a4eda

Browse files
Merge pull request #1741 from tretter/shelldriver-fix-symlinked-authorized_keys
driver/shelldriver: dereference symlinks when copying .ssh
2 parents 2daa13d + 864ba01 commit 05a4eda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

labgrid/driver/shelldriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def _put_ssh_key(self, keyfile_path):
277277

278278
self.logger.debug("Key not on target and not writeable, using bind mount...")
279279
self._run_check('mkdir -p -m 700 /tmp/labgrid-ssh/')
280-
self._run("cp -a ~/.ssh/* /tmp/labgrid-ssh/")
280+
self._run("cp -aL ~/.ssh/* /tmp/labgrid-ssh/")
281281
self._write_key(keyline, "/tmp/labgrid-ssh/authorized_keys")
282282
self._run_check('chmod 600 /tmp/labgrid-ssh/authorized_keys')
283283
out, err, exitcode = self._run('mount --bind /tmp/labgrid-ssh/ ~/.ssh/')

0 commit comments

Comments
 (0)