bash-it/plugins/available/ssh.plugins.bash

10 lines
237 B
Bash

#!/usr/bin/env bash
function add_ssh() {
echo -en "\n\nHost $1\n HostName $2\n User $3\n ServerAliveInterval 30\n ServerAliveCountMax 120" >> ~/.ssh/config
}
function sshlist() {
awk '$1 ~ /Host$/ { print $2 }' ~/.ssh/config
}