#!/bin/bash
defaultuser="<defaultuser>"
if [ -z $1 ]; then
  echo "usage: $defaultuser [<last octet hints>]"
  exit 0
fi

triplet="aaa.bbb.ccc"

echo "ssh to $triplet.$1"
if [ -z $2 ]; then 
   echo "user: $defaultuser"
   ssh [email protected]$triplet.$1
   exit 0;
else
   echo "user: $2"
   ssh [email protected]$triplet.$1
fi

# lets you ssh to ip quickly
# replace <defaultuser> with the username you often login
# replate change aaa.bbb.ccc to the first 3 octet of the ip