configfiles/scripts/ssh_hosts.sh

8 lines
123 B
Bash
Raw Normal View History

#!/bin/bash
CONFIG="$HOME/.ssh/config"
if [ -f "$CONFIG" ]; then
cat "$CONFIG" | awk '{if($1=="Host"){print $2}}'
fi