summaryrefslogtreecommitdiff
path: root/test/integration/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/common.rb')
-rw-r--r--test/integration/common.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/integration/common.rb b/test/integration/common.rb
index 9f56fe9..fb29d7a 100644
--- a/test/integration/common.rb
+++ b/test/integration/common.rb
@@ -20,6 +20,10 @@ module IntegrationTestHelpers
end
end
+ def sshd_8_or_later?
+ !!(`sshd -v 2>&1 |grep 'OpenSSH_'` =~ /OpenSSH_8./)
+ end
+
def set_authorized_key(user, pubkey)
authorized_key = "/home/#{user}/.ssh/authorized_keys"
sh "sudo cp #{pubkey} #{authorized_key}"