#!/bin/bash # quickly disable and enable authorized ssh keys # -t to toggle, no argument to view status if [ "$1" == "-t" ]; then if [ -e ~/.ssh/authorized_keys ]; then mv ~/.ssh/authorized_keys ~/.ssh/authorized_keys.niu elif [ -e ~/.ssh/authorized_keys.niu ]; then mv ~/.ssh/authorized_keys.niu ~/.ssh/authorized_keys else echo ".ssh/authorized_keys not found!" exit fi fi echo $(ls ~/.ssh/authorized_keys*)