feat(ssh): use global ssh config

This commit is contained in:
yeti 2025-05-13 08:48:50 +01:00
parent c67ce5e7e4
commit fd9e672d28
3 changed files with 3 additions and 16 deletions

View File

@ -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

View File

@ -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 "\$@"

View File

@ -1,8 +0,0 @@
#!/bin/bash
# Example: block push or connections to some hosts
if [[ "$*" != *"alps"* ]]; then
exit 1
fi
exit 0