From: martin f. krafft Date: Thu, 24 Apr 2025 09:09:13 +0000 (+0200) Subject: experiment with VNC and ssh config tags X-Git-Url: https://git.madduck.net/etc/ssh.git/commitdiff_plain/79b75315cd44b30a109457f8bdedb37325c29367 experiment with VNC and ssh config tags --- diff --git a/.gitignore.d/ssh b/.gitignore.d/ssh index 4eb514f..f929537 100644 --- a/.gitignore.d/ssh +++ b/.gitignore.d/ssh @@ -11,6 +11,7 @@ !/.ssh/config.in !/.ssh/.gitignore !/.ssh/known_hosts.d/debian.org +!/.ssh/known_hosts.d/envs.net !/.ssh/known_hosts.d/fo.krafftwerk.de !/.ssh/known_hosts.d/gern.madduck.net !/.ssh/known_hosts.d/github.com @@ -24,6 +25,7 @@ !/.ssh/known_hosts.d/toni.immo !/.ssh/known_hosts.d/toni.madduck.net !/.ssh/known_hosts.d/viinet.de +!/.ssh/known_hosts.d/virt !/.ssh/Makefile !/.ssh/rc !/.var/ssh/.gitignore diff --git a/.ssh/config.in b/.ssh/config.in index 2f36e5b..28f32be 100644 --- a/.ssh/config.in +++ b/.ssh/config.in @@ -273,11 +273,9 @@ Host lotus.gern Host lotus.gern-vnc HostName lotus - ConnectTimeout 120 - ControlPath none ProxyCommand ssh wall.gern.madduck.net "n=30 && while ! nc -w 1 %h %p; do [ \$n -gt 0 ] || exit 1; wakeonlan -i 192.168.39.255 dc:fb:48:35:03:04; printf "%%02d: " \$n >&2; n=\$((\$n-1)); done" - LocalForward localhost:8385 localhost:8384 - RemoteCommand pkill x11vnc; x11vnc -display :0 -nopw -localhost -norepeat -gone '/usr/bin/xautolock -locknow' + Tag vnc + LocalForward localhost:5960 localhost:5960 Host lotus.* | lotus HostName lotus.fo.krafftwerk.de @@ -290,11 +288,15 @@ Host lotus.* | lotus Host lotus-vnc HostName lotus.fo.krafftwerk.de HostKeyAlias lotus - ControlPath none - ConnectTimeout 120 ProxyCommand sh -c 'for i in 1 2 3; do wakeonlan -i 192.168.235.255 dc:fb:48:35:03:04 && sleep $i && socat - TCP:%h:%p,connect-timeout=120 && break; done' - RemoteCommand pkill x11vnc; x11vnc -display :0 -rfbport 5960 -nopw -localhost -norepeat -gone '/usr/bin/xautolock -locknow' + Tag vnc LocalForward localhost:5960 localhost:5960 + #LocalForward localhost:5960 /run/user/1000/x11vnc.%C.sock + +Match tagged vnc + ControlPath none + ConnectTimeout 120 + RemoteCommand pkill x11vnc; x11vnc -display :0 -rfbport 5960 -unixsock $XDG_RUNTIME_DIR/x11vnc.%C.sock -nopw -localhost -norepeat -timeout 10 -gone '/usr/bin/xautolock -locknow' Host emerald | emerald.kids.gern | emerald.rw.madduck.net CheckHostIP no