aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-26 20:59:41 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-26 20:59:41 +0200
commite66e302cea1e562ac5030c3855d6e14fb0b64243 (patch)
tree1c91ae0a47e05ecd33967294c808415a5747f767 /lib
parent50b197935ee39ac9efd472dd7b3de5e497db4ea4 (diff)
Alter the configuration used for ssh
Diffstat (limited to 'lib')
-rw-r--r--lib/subcommands/ssh.bash14
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