Commit fe77cb98 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Refactor SSH scripts

parent ddf8416c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -56,6 +56,9 @@ manage_path PREFIX ~/.local check
manage_path PATH /usr/games check
manage_path PATH /usr/local/games check

# SSH wrapper scripts
manage_path PATH ~/.ssh/bin before

# Other prefixes (suggested from 
# https://github.com/NARKOZ/dotfiles/blob/narkoz/.bashrc)
manage_path PREFIX /usr/pkg check
+0 −4
Original line number Diff line number Diff line
@@ -19,10 +19,6 @@ alias grep='~/.shell/bin/grep-auto-exclude grep -n'
alias fgrep='~/.shell/bin/grep-auto-exclude fgrep -n'
alias egrep='~/.shell/bin/grep-auto-exclude egrep -n'

# special SSH
alias ssh="ssh -F '${SSH_CONFIG:=`~/.ssh/ssh --make-config`}'"
alias scp="scp -F '${SSH_CONFIG:=`~/.ssh/ssh --make-config`}'"

# special vim
alias vim="FROM_ALIAS=yes $EDITOR"

.ssh/bin/ssh

0 → 100755
+18 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eu

. ~/.ssh/lib/funcs.sh

manage_path PATH `dirname $0` beginning 

case " $*" in
	*' -F'*) exec ${SSH_BIN} "$@" ;;
	' --make-config'*) 
		make_config
		echo "$CONFIG"
		;;
	*)
		make_config
		exec ${SSH_BIN} -F "$CONFIG" "$@"
		;;
esac
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ Host *.bath.ac.uk

# === LAN Settings ===
Host *.net.kodo.org.uk *.lw.kodo.org.uk 192.168.1.* 192.168.2.* 10.56.*
	ProxyCommand ~/.ssh/forward %h %p 1-gw1.net.kodo.org.uk
	ProxyCommand ~/.ssh/lib/forward %h %p 1-gw1.net.kodo.org.uk
	CheckHostIP no


+0 −0

File moved.

Loading