Skip to content

Instantly share code, notes, and snippets.

@danackerson
Last active June 2, 2022 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danackerson/010d3324f91119b599433638555294a5 to your computer and use it in GitHub Desktop.
Save danackerson/010d3324f91119b599433638555294a5 to your computer and use it in GitHub Desktop.
ssh config
$ vi .ssh/wake_blonde-bomber.sh
#!/bin/bash
wakeonlan 2c:f0:5d:5e:84:43
while [ $(nmap "$1" -PN -6 -p ssh | grep -E 'open|closed|filtered' | awk '{print $2}') == "closed" ]
do
echo "ssh not available..."
sleep 3
done
nc "$1" "$2"
$ vi ~/.ssh/config
Host *
ServerAliveInterval 60
# UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
# IdentitiesOnly=yes
Host bd
Hostname buildoor.ackerson.de
AddKeysToAgent yes
ForwardAgent yes
Port 22
ProxyCommand ~/.ssh/wake_blonde-bomber.sh %h %p
Host homepage
Hostname ackerson.de
User root
IdentityFile ~/.ssh/id_ecdsa_sk
#ProxyCommand ssh -o 'ForwardAgent yes' ubuntu@pi4 'ssh-add my-ca/id_ed25519_github_deploy && nc ackerson.de %p'
Host vault
Hostname vault.ackerson.de
User root
IdentityFile ~/.ssh/id_ecdsa_sk
#ProxyCommand ssh -o 'ForwardAgent yes' ubuntu@pi4 'ssh-add my-ca/id_ed25519_github_deploy && nc vault.ackerson.de %p'
Host pi4
User ubuntu
Hostname cakefor.ackerson.de
AddKeysToAgent yes
Host vpnpi
User ubuntu
Hostname chore.ackerson.de
AddKeysToAgent yes
Host wg_pi4
User ubuntu
ProxyCommand ssh -o 'ForwardAgent yes' ubuntu@10.9.0.1 'nc 192.168.178.27 %p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment