configfiles/scripts/ssh_hosts.sh

7 lines
123 B
Bash
Executable file

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