File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed
Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ docker run -it --rm \
1616 -v " ${PWD} /lima-init-local.openrc:/home/build/lima-init-local.openrc:ro" \
1717 -v " ${PWD} /lima-network.awk:/home/build/lima-network.awk:ro" \
1818 -v " ${PWD} /nerdctl-${NERDCTL_VERSION} :/home/build/nerdctl.tar.gz:ro" \
19+ -v " ${PWD} /sshd.pam:/home/build/sshd.pam:ro" \
1920 $( env | grep ^LIMA_ | xargs -n 1 printf -- ' -e %s ' ) \
2021 -e " LIMA_REPO_VERSION=${REPO_VERSION} " \
2122 " mkimage:${ALPINE_VERSION} " \
Original file line number Diff line number Diff line change 4444mkdir -p " $tmp " /etc/apk
4545makefile root:root 0644 " $tmp " /etc/apk/world << EOF
4646alpine-base
47- openssh
47+ openssh-server-pam
4848EOF
4949
5050rc_add devfs sysinit
@@ -73,6 +73,17 @@ rc_add networking default
7373
7474rc_add sshd default
7575
76+ rc_add local default
77+
78+ mkdir -p " ${tmp} /etc/local.d/"
79+ makefile root:root 0755 " $tmp /etc/local.d/lima.start" << EOF
80+ sed -i 's/#UsePAM no/UsePAM yes/g' /etc/ssh/sshd_config
81+ rc-service --ifstarted sshd reload
82+ EOF
83+
84+ mkdir -p " $tmp " /etc/pam.d
85+ cp /home/build/sshd.pam " ${tmp} /etc/pam.d/sshd"
86+
7687if [ " ${LIMA_INSTALL_LIMA_INIT} " == " true" ]; then
7788 rc_add lima-init default
7889 rc_add lima-init-local default
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ profile_lima() {
1313 kernel_cmdline=" console=tty0 console=ttyS0,115200"
1414 syslinux_serial=" 0 115200"
1515 apkovl=" genapkovl-lima.sh"
16- apks=" $apks openssh"
16+ apks=" $apks openssh-server-pam "
1717 if [ " ${LIMA_INSTALL_CA_CERTIFICATES} " == " true" ]; then
1818 apks=" $apks ca-certificates"
1919 fi
Original file line number Diff line number Diff line change 1+ auth include system-login
2+ account include system-login
3+ password include system-login
4+ session include system-login
You can’t perform that action at this time.
0 commit comments