diff options
Diffstat (limited to 'lib/subcommands/ssh.bash')
-rw-r--r-- | lib/subcommands/ssh.bash | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/subcommands/ssh.bash b/lib/subcommands/ssh.bash index bc3fb9b..563aa73 100644 --- a/lib/subcommands/ssh.bash +++ b/lib/subcommands/ssh.bash @@ -6,10 +6,6 @@ subcommand() { - local ssh - - ssh="$(config "app.ssh")" - if [[ ! -d "$BASHTARD_ETCDIR/hosts.d" ]] then crit "$BASHTARD_NAME/ssh" "Could not find hosts file at $BASHTARD_ETCDIR/hosts.d" @@ -23,18 +19,18 @@ subcommand() local user local host - user="$(config_for "$node" "ssh.user" "root")" - host="$(config_for "$node" "ssh.host" "$(config_for "$node" "vpn.ipv4")")" + user="$(config_for "$node" "bashtard.ssh.user" "$USER")" + host="$(config_for "$node" "bashtard.ssh.host" "$(config_for "$node" "vpn.ipv4")")" if [[ -z "$host" ]] then - crit "ssh" "ssh.host is not configured for $node" + crit "$BASHTARD_NAME/ssh" "bashtard.ssh.host is not configured for $node" continue fi - notice "ssh" "$user@$node ($host) > $*" + notice "$BASHTARD_NAME/ssh" "$user@$node ($host) > $*" - $ssh "$user@$host" "$@" + ssh "$user@$host" "$@" unset user unset host |