[elbe-devel] [RFC PATCH 2/5] init init-elbe.sh.mako: Configure ssh/rsync on devel guests

Olivier Dion dion at linutronix.de
Tue May 5 22:02:48 CEST 2020


Let's allow devel guests to have root login for ssh instead of using
the virsh console.

This also configure the rsync daemon on devel guests.  The
configuration allows only upload from the host.

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/init/init-elbe.sh.mako | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/elbepack/init/init-elbe.sh.mako b/elbepack/init/init-elbe.sh.mako
index c5d56d3f..b4f4ed60 100644
--- a/elbepack/init/init-elbe.sh.mako
+++ b/elbepack/init/init-elbe.sh.mako
@@ -77,4 +77,30 @@ in-target haveged
   in-target ${elbe_exe} fetch_initvm_pkgs ${buildrepo_opts} /var/cache/elbe/source.xml
 % endif
 
+% if opt.devel:
+echo 'PermitRootLogin yes' >> /buildenv/etc/ssh/sshd_config
+
+cat <<EOF > /buildenv/etc/rsyncd.conf
+pid file = /var/run/rsyncd.pid
+syslog facility = syslog
+
+[elbe]
+path = /var/cache/elbe/devel/elbepack
+
+# Keep owner:group as root
+fake super = yes
+
+# Root permissions
+uid = 0
+gid = 0
+
+# This should be the host
+hosts allow = 10.0.2.2
+
+# Upload only
+read only = false
+write only = true
+EOF
+% endif
+
 exit 0
-- 
2.26.2




More information about the elbe-devel mailing list