diff --git a/ssh/config b/00-allow-git.conf similarity index 68% rename from ssh/config rename to 00-allow-git.conf index ad15423..10ac1c7 100644 --- a/ssh/config +++ b/00-allow-git.conf @@ -1,10 +1,11 @@ - Host alps + HostName %h User git IdentityFile /opt/secure/ssh/id_ed25519 IdentitiesOnly yes StrictHostKeyChecking yes Port 2222 + ProxyCommand none Host * - ProxyCommand /opt/secure/ssh/ssh-blocker.sh %h %p + ProxyCommand /bin/false diff --git a/ssh/secure-ssh-wrapper.sh b/ssh/secure-ssh-wrapper.sh deleted file mode 100755 index afed73e..0000000 --- a/ssh/secure-ssh-wrapper.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -if ! /opt/secure/ssh/ssh_blocker.sh "$@"; then - echo "❌ Restricted access" - exit 1 -fi -exec ssh -F /opt/secure/ssh/config -i /opt/secure/ssh/id_ed25519 "\$@" diff --git a/ssh/ssh_blocker.sh b/ssh/ssh_blocker.sh deleted file mode 100755 index 2945984..0000000 --- a/ssh/ssh_blocker.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# Example: block push or connections to some hosts - -if [[ "$*" != *"alps"* ]]; then - exit 1 -fi - -exit 0