diff --git a/protected_resources/scripts/install-config-ssh.sh b/protected_resources/scripts/install-config-ssh.sh index 9ffcccf..a40f678 100644 --- a/protected_resources/scripts/install-config-ssh.sh +++ b/protected_resources/scripts/install-config-ssh.sh @@ -61,3 +61,6 @@ fi # Set PermitRootLogin to prohibit-password sed -i 's/^#*PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config + +# Generate SSH keys (doesn't overwrite if keys already exists) +ssh-keygen -q -t rsa -N '' <<< $'\nn' >/dev/null 2>&1 \ No newline at end of file diff --git a/src/lxc/lxc.py b/src/lxc/lxc.py index e30a0dc..a9a9dd1 100644 --- a/src/lxc/lxc.py +++ b/src/lxc/lxc.py @@ -362,7 +362,7 @@ class LXC(LinuxMachine): :param script_path: :return: """ - return self.run_command(command=f"chmod +x {script_path} && bash {script_path}") + return self.run_command(command=f"bash {script_path}") def run_command(self, command: str, return_status_code: bool = False, exception_on_exit: bool = False,