add ssh profile

This commit is contained in:
valoq 2020-05-26 17:08:21 +02:00
parent 24f691ba9c
commit e581261775
No known key found for this signature in database
GPG Key ID: 19F09A0FB865CBD8
1 changed files with 29 additions and 0 deletions

29
profiles/ssh Normal file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
(
exec bwrap \
--ro-bind /usr/bin/ssh /usr/bin/ssh \
--ro-bind /usr/share /usr/share \
--ro-bind /usr/lib /usr/lib \
--ro-bind /usr/lib64 /usr/lib64 \
--symlink /usr/lib64 /lib64 \
--tmpfs /usr/lib/modules \
--tmpfs /usr/lib/systemd \
--tmpfs /usr/lib/gcc \
--proc /proc \
--dev-bind /dev /dev \
--ro-bind ~/.ssh/ ~/.ssh/ \
--ro-bind /etc /etc \
--chdir ~/ \
--unsetenv MOZ_PLUGIN_PATH \
--unsetenv DBUS_SESSION_BUS_ADDRESS \
--unsetenv MAIL \
--unsetenv DISPLAY \
--setenv PATH /usr/bin \
--unshare-pid \
--unshare-uts \
--unshare-cgroup \
--seccomp 10 \
10< /usr/local/bin/seccomp_default_filter.bpf \
/usr/bin/ssh "$@"
)