From 4ee282e7d6054565d5b64b9c9ba64950cc61f4c0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 24 Nov 2022 18:41:12 +0000 Subject: [PATCH] Rename lxd-init to setup, add general setup Make it so that allowed_auths only returns "password" --- lxd-init.sh | 3 --- setup.sh | 14 ++++++++++++++ sshim_patch.py | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) delete mode 100644 lxd-init.sh create mode 100644 setup.sh diff --git a/lxd-init.sh b/lxd-init.sh deleted file mode 100644 index 51c0d06..0000000 --- a/lxd-init.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -yes '' | lxd init diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..2379e34 --- /dev/null +++ b/setup.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +export DEBIAN_FRONTEND=noninteractive + +sudo apt-get update -y +sudo apt-get upgrade -y +sudo apt-get install snapd +sudo snap install lxd + +yes '' | lxd init + +sudo apt-get install python3-pip +python3 -m pip install paramiko pylxd sshim diff --git a/sshim_patch.py b/sshim_patch.py index a6ef77f..813c761 100644 --- a/sshim_patch.py +++ b/sshim_patch.py @@ -25,4 +25,5 @@ Handler.check_auth_none = check_auth_none Handler.check_auth_password = check_auth_password Handler.check_auth_publickey = check_auth_publickey Handler.enable_auth_gssapi = enable_auth_gssapi +Handler.get_allowed_auths = paramiko.server.ServerInterface.get_allowed_auths