aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-11 02:15:07 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-11 02:15:07 +0200
commit6d89fa1486fc78a2ffa10f8ed927c8af3fbf181f (patch)
tree3d5bf7738d438a80b775e8c5cd6a145d368d4bba /lib
parentaf18d5f15dc7a64ba45d8c7b474ee0ce2750b050 (diff)
Make ssh use ssh.host properly
Diffstat (limited to 'lib')
-rw-r--r--lib/subcommands/ssh.bash8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/subcommands/ssh.bash b/lib/subcommands/ssh.bash
index b5712cc..bc3fb9b 100644
--- a/lib/subcommands/ssh.bash
+++ b/lib/subcommands/ssh.bash
@@ -24,14 +24,12 @@ subcommand()
local host
user="$(config_for "$node" "ssh.user" "root")"
-
- # Try IPv6 first
- host="$(config_for "$node" "ssh.host" "$(config_for "$node" "vpn.ipv6")")"
+ host="$(config_for "$node" "ssh.host" "$(config_for "$node" "vpn.ipv4")")"
if [[ -z "$host" ]]
then
- # Otherwise try IPv4
- host="$(config_for "$node" "ssh.host" "$(config_for "$node" "vpn.ipv4")")"
+ crit "ssh" "ssh.host is not configured for $node"
+ continue
fi
notice "ssh" "$user@$node ($host) > $*"