From e66e302cea1e562ac5030c3855d6e14fb0b64243 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Thu, 26 May 2022 20:59:41 +0200 Subject: Alter the configuration used for ssh --- lib/subcommands/ssh.bash | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'lib') 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 -- cgit v1.1