feat(ssh): use global ssh config
This commit is contained in:
parent
c67ce5e7e4
commit
fd9e672d28
@ -1,10 +1,11 @@
|
|||||||
|
|
||||||
Host alps
|
Host alps
|
||||||
|
HostName %h
|
||||||
User git
|
User git
|
||||||
IdentityFile /opt/secure/ssh/id_ed25519
|
IdentityFile /opt/secure/ssh/id_ed25519
|
||||||
IdentitiesOnly yes
|
IdentitiesOnly yes
|
||||||
StrictHostKeyChecking yes
|
StrictHostKeyChecking yes
|
||||||
Port 2222
|
Port 2222
|
||||||
|
ProxyCommand none
|
||||||
|
|
||||||
Host *
|
Host *
|
||||||
ProxyCommand /opt/secure/ssh/ssh-blocker.sh %h %p
|
ProxyCommand /bin/false
|
@ -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 "\$@"
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Example: block push or connections to some hosts
|
|
||||||
|
|
||||||
if [[ "$*" != *"alps"* ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|
Loading…
x
Reference in New Issue
Block a user