]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ssh-proxy: Default to root user
authorDaan De Meyer <daan@amutable.com>
Fri, 29 May 2026 07:16:33 +0000 (07:16 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 29 May 2026 14:13:29 +0000 (16:13 +0200)
When ssh-ing into a VM, you generally do not want to log
in as your user from the host. Let's default to the root
user unless a user is explicitly specified.

src/ssh-generator/20-systemd-ssh-proxy.conf.in

index e43560aa74b26a4841e2b1d1a973c26bd9a189b4..f88eca3275c61f0976e02043c22f65dd858ead89 100644 (file)
@@ -10,6 +10,7 @@ Host .host machine/.host
 # Make sure machine/* can be used to connect to local machines registered in machined.
 #
 Host unix/* unix%* vsock/* vsock%* vsock-mux/* vsock-mux%* machine/* machine%*
+        User root
         ProxyCommand {{LIBEXECDIR}}/systemd-ssh-proxy %h %p
         ProxyUseFdpass yes
         CheckHostIP no