Added rsh function for ips file

This commit is contained in:
Austen Adler 2015-12-04 09:10:58 -05:00
parent 57331ef47b
commit 3faf271337

View File

@ -37,6 +37,15 @@ alias ll='ls -AglhF'
alias la='ls -A'
alias l='ls -CF'
alias logout='sudo pkill -u $USER'
function rsh(){
ADDR=$(cat /home/stonewareslord/syncthing/shared/ips | sed -rne "s/^$1: //p")
if [ -z $ADDR ] ; then
echo "Hostname not found"
return 1
fi
echo "SSH to $ADDR..."
tsh $ADDR
}
function fixsh(){
sed -i -e $1"d" ~/.ssh/known_hosts
}