Skip to content
Snippets Groups Projects
Commit e1d28806 authored by nimrod's avatar nimrod
Browse files

- Better Dojo box SSH script.

parent eb8d24ac
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,6 @@ alias kpcli='kpcli --kdb ~/Documents/Database.kdbx' ...@@ -71,7 +71,6 @@ alias kpcli='kpcli --kdb ~/Documents/Database.kdbx'
alias gen-mac="hexdump -n5 -e '\"02\" 5/1 \":%02X\" \"\\n\"' /dev/urandom" alias gen-mac="hexdump -n5 -e '\"02\" 5/1 \":%02X\" \"\\n\"' /dev/urandom"
alias clean-swp="find \$HOME/ -name '*.swp' -delete" alias clean-swp="find \$HOME/ -name '*.swp' -delete"
alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking no\"" alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking no\""
alias boxssh="unssh -i \$HOME/.ssh/bullguard-box_rsa -l root -p 64222"
alias todo="vim \$HOME/Documents/TODO.yml" alias todo="vim \$HOME/Documents/TODO.yml"
alias sudo="sudo " alias sudo="sudo "
alias presentation='docker run -itv "$PWD:/project" adarnimrod/presentation' alias presentation='docker run -itv "$PWD:/project" adarnimrod/presentation'
......
#!/bin/sh
set -eu
die () {
echo "$@"
exit 1
}
which ip > /dev/null || die "Can't find ip."
alias ssh='ssh -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" -i "$HOME/.ssh/bullguard-box_rsa" -l root -p 64222'
gateway="$(ip neigh show | awk '$5 ~ /^38:b8:eb:5/ {print $1}')"
[ -n "$gateway" ] || die "Can't find Dojo box IP."
ssh "$gateway"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment