From 0905a4d83976bf3f2f3137c6cc50e2ab65947bfd Mon Sep 17 00:00:00 2001 From: Oskar Eichler Date: Sun, 30 Aug 2026 11:28:12 +0200 Subject: [PATCH] Keep inherited SSH options dynamic --- lib/sshkit/backends/netssh.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sshkit/backends/netssh.rb b/lib/sshkit/backends/netssh.rb index 03be64cb..31695170 100644 --- a/lib/sshkit/backends/netssh.rb +++ b/lib/sshkit/backends/netssh.rb @@ -188,12 +188,14 @@ def execute_command(cmd) end def with_ssh(&block) - host.ssh_options = self.class.config.ssh_options.merge(host.ssh_options || {}) + ssh_options = host.netssh_options + .merge(self.class.config.ssh_options) + .merge(host.ssh_options || {}) self.class.pool.with( Net::SSH.method(:start), String(host.hostname), host.username, - host.netssh_options, + ssh_options, &block ) end