Aliases

In ~/.bashrc

# User specific aliases and functions
source ~/.my-aliases.sh
source ~/.other-aliases.sh

if [ -z "$STY" ]; then screen -R; fi

In ~/.my-aliases.sh

#!/bin/bash

adusername="james.bensley.domain"
logDir="$HOME/.ssh/logs"
mkdir -p $logDir

ssh () {
  /usr/bin/ssh $1 2>&1 | tee $logDir/`date +"%Y-%m-%d--%H-%M-%S-%N"`-$1.txt
}

telnet () {
  /usr/bin/telnet $1 2>&1 | tee $logDir/`date +"%Y-%m-%d--%H-%M-%S-%N"`-$1.txt
}

#
# Some Devices
#
alias lab-2801-1='telnet 10.116.26.20' # Cisco 2801 LAB RACK 2
alias lab-2801-2='telnet 10.116.26.21' # Cisco 2801 LAB RACK 4
alias lab-2960-rack1-30net='telnet 10.116.26.10' # Cisco 2960 ToR switch Rack 1 - 30 Network
alias lab-2960-rack1='ssh [email protected]' # Cisco 2960 ToR switch Rack 1
alias lab-2960-rack2='ssh [email protected]' # Cisco 2960 ToR switch Rack 2
alias lab-2960-rack3='ssh [email protected]' # Cisco 2960 ToR switch Rack 3
alias lab-2960-rack4='ssh [email protected]' # Cisco 2960 ToR switch Rack 4
alias lab-2960-rack5='ssh [email protected]' # Cisco 2960 ToR switch Rack 5
alias lab-2960-rack6='ssh [email protected]' # Cisco 2960 ToR switch Rack 6