diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 17:06:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 17:06:32 +0000 |
commit | 2dad5357405ad33cfa792f04b3ab62a5d188841e (patch) | |
tree | b8f8893942060fe3cfb04ac374cda96fdfc8f453 /environments/vncserver-ssh-socket-forward | |
parent | Initial commit. (diff) | |
download | remmina-2dad5357405ad33cfa792f04b3ab62a5d188841e.tar.xz remmina-2dad5357405ad33cfa792f04b3ab62a5d188841e.zip |
Adding upstream version 1.4.34+dfsg.upstream/1.4.34+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'environments/vncserver-ssh-socket-forward')
6 files changed, 99 insertions, 0 deletions
diff --git a/environments/vncserver-ssh-socket-forward/Dockerfile b/environments/vncserver-ssh-socket-forward/Dockerfile new file mode 100644 index 0000000..01171d3 --- /dev/null +++ b/environments/vncserver-ssh-socket-forward/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:latest + +RUN apt-get update && apt-get install -y tigervnc-standalone-server openssh-server xvfb xterm +RUN mkdir -p /run/sshd /var/run/sshd /root/.vnc /root/.ssh ; \ + echo "root:root" | chpasswd && \ + echo 'Port 2222' >> /etc/ssh/sshd_config && \ + echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && \ + echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config && \ + echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config && \ + echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +EXPOSE 2222 + +COPY passwd /root/.vnc/passwd + +COPY ssh_key /root/.ssh/authorized_keys + +COPY entrypoint.sh /entrypoint.sh + +CMD [ "/entrypoint.sh" ] diff --git a/environments/vncserver-ssh-socket-forward/entrypoint.sh b/environments/vncserver-ssh-socket-forward/entrypoint.sh new file mode 100755 index 0000000..83ede79 --- /dev/null +++ b/environments/vncserver-ssh-socket-forward/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "remmina" >> ~/.vnc/passwd + +# Start the vnc server while only accepting connections through the unix-socket. +# This will prompt the user for a password +vncserver -rfbport=-1 -rfbunixpath /vnc-server-tmp/vnc.socket -xstartup /usr/bin/xterm + +cat ~/.ssh/authorized_keys + +echo "SSH Server up!" +$(which sshd) -D diff --git a/environments/vncserver-ssh-socket-forward/passwd b/environments/vncserver-ssh-socket-forward/passwd new file mode 100644 index 0000000..b37aff4 --- /dev/null +++ b/environments/vncserver-ssh-socket-forward/passwd @@ -0,0 +1 @@ +ª‹§‚Â:ÿ~
\ No newline at end of file diff --git a/environments/vncserver-ssh-socket-forward/run.sh b/environments/vncserver-ssh-socket-forward/run.sh new file mode 100644 index 0000000..f807d25 --- /dev/null +++ b/environments/vncserver-ssh-socket-forward/run.sh @@ -0,0 +1,25 @@ +if ! type podman > /dev/null; then + if ! type docker > /dev/null; then + echo "Install podman or docker to use the remmina environments!" + exit 1 + fi + CRT=docker +else + CRT=podman +fi + +CONTAINER_NAME="vncserver-ssh-socket-forward" + +$CRT stop "${CONTAINER_NAME}" +$CRT rm "${CONTAINER_NAME}" + +$CRT build . -t remmina/test-server:latest + +rm -f "${PWD}/vnc-server-tmp/vnc.socket" +rm -f "${PWD}/vnc-server-tmp/forwarded.socket" + +$CRT run -d -p 2222:2222 -v "${PWD}/ssh_key.pub:/root/.ssh/authorized_keys:rw" -v "${PWD}/vnc-server-tmp:/vnc-server-tmp:rw" --rm --name "${CONTAINER_NAME}" -t remmina/test-server:latest + +sleep 5 + +ssh -i "${PWD}/ssh_key" -o "LocalForward=${PWD}/vnc-server-tmp/forwarded.socket /vnc-server-tmp/vnc.socket" -o StreamLocalBindUnlink=yes -o ExitOnForwardFailure=yes root@localhost -p 2222 diff --git a/environments/vncserver-ssh-socket-forward/ssh_key b/environments/vncserver-ssh-socket-forward/ssh_key new file mode 100644 index 0000000..d23e15d --- /dev/null +++ b/environments/vncserver-ssh-socket-forward/ssh_key @@ -0,0 +1,38 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn +NhAAAAAwEAAQAAAYEA5JWiQ/HbzoCey7rGfM6ogy89aRdtzERh45JMstsb4mRnOa+1W26A +vhoMuTyLhJF0eZQrplnjRlni/bAPizsU9W00spB7G1mciuMzM1Jk4EweRUfqes6lip5eyM +rfqqxax0iilnpOA5pA+24ArdRCwefJYg6PfGhaGKoWUW+pXySPvF6K2yPpWV6naopf6tkm +ezJX70daU7dCLs4YQCEujl6nIJnPM7ym5uI94HCem08h8/d8+2AVVtSpLDOx/dXy9DvieM +5E3+ps6DDq0QimBoJHXYms3+s5YT2z3VXy3fM0FZuVgqMjCWN5di83gYkSy0a+kVaSXYQe +wRr3ZJsYJ9W8UxexMSKt5HNzYPDx+pGWXbuMy/4IhJ4foZqj5uolcd5d5n4yebi2Wg10od +mSYhkBN2uP+MM0Vat1S38c5wNp1UUqIMHE0Qzj6yXrigubtyS5rrCVChjAvqGUKBeYRtYw +Aw8AP5FxXp+8esVehTOl5n1CJlktWBCcWmde0ZQ9AAAFiC3TK5Qt0yuUAAAAB3NzaC1yc2 +EAAAGBAOSVokPx286Ansu6xnzOqIMvPWkXbcxEYeOSTLLbG+JkZzmvtVtugL4aDLk8i4SR +dHmUK6ZZ40ZZ4v2wD4s7FPVtNLKQextZnIrjMzNSZOBMHkVH6nrOpYqeXsjK36qsWsdIop +Z6TgOaQPtuAK3UQsHnyWIOj3xoWhiqFlFvqV8kj7xeitsj6Vlep2qKX+rZJnsyV+9HWlO3 +Qi7OGEAhLo5epyCZzzO8pubiPeBwnptPIfP3fPtgFVbUqSwzsf3V8vQ74njORN/qbOgw6t +EIpgaCR12JrN/rOWE9s91V8t3zNBWblYKjIwljeXYvN4GJEstGvpFWkl2EHsEa92SbGCfV +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jqKrvzJIHQ7coxf1c0TS482TbREuXvnMDpnh7Ms33egdWu+DxDDjfhvWRnz5bKmCBkc +I/QKXzUwYDQoCdcFSW8tXqv3Jyc8zjYe0e/wGoYzBu9/cnPLnkklMv1w4kVRj9b1qpK48u +dGgI/u++spF9oUJiL2PaQX0bBUlzwJwQAAAMEA6Db//5dXzLeZEvxH0ir6fk/1W7O8Kgwc +00Q41TlqVdwRZfh3nyGyaqU/jmR9CKtEW/fcIp+IVsxE+50W73qwkdny9ZL7Iu7OtPL+ls +qqTgwxXFr1ZH0bChBQugmBTIlV5GTnQzM1v8wOzuCgTpMAMXUH8PKgwbA7SnrBqKqMB9vm +W/8sYoYDbxoVXmEl/BA8++KuBlP5tJzosK23brh8ew9hqXbNzInj7n1PlOzFodYUQdMiFs +A8HN9tqKkimxF9AAAADm1hdGhpYXNAcG9wLW9zAQIDBA== +-----END OPENSSH PRIVATE KEY----- diff --git a/environments/vncserver-ssh-socket-forward/ssh_key.pub b/environments/vncserver-ssh-socket-forward/ssh_key.pub new file mode 100644 index 0000000..aa0f982 --- /dev/null +++ b/environments/vncserver-ssh-socket-forward/ssh_key.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDklaJD8dvOgJ7LusZ8zqiDLz1pF23MRGHjkkyy2xviZGc5r7VbboC+Ggy5PIuEkXR5lCumWeNGWeL9sA+LOxT1bTSykHsbWZyK4zMzUmTgTB5FR+p6zqWKnl7Iyt+qrFrHSKKWek4DmkD7bgCt1ELB58liDo98aFoYqhZRb6lfJI+8XorbI+lZXqdqil/q2SZ7MlfvR1pTt0IuzhhAIS6OXqcgmc8zvKbm4j3gcJ6bTyHz93z7YBVW1KksM7H91fL0O+J4zkTf6mzoMOrRCKYGgkddiazf6zlhPbPdVfLd8zQVm5WCoyMJY3l2LzeBiRLLRr6RVpJdhB7BGvdkmxgn1bxTF7ExIq3kc3Ng8PH6kZZdu4zL/giEnh+hmqPm6iVx3l3mfjJ5uLZaDXSh2ZJiGQE3a4/4wzRVq3VLfxznA2nVRSogwcTRDOPrJeuKC5u3JLmusJUKGMC+oZQoF5hG1jADDwA/kXFen7x6xV6FM6XmfUImWS1YEJxaZ17RlD0= mathias@pop-os |