summaryrefslogtreecommitdiff
path: root/test/integration/test_ed25519_pkeys.rb
diff options
context:
space:
mode:
authorMiklós Fazekas <mfazekas@szemafor.com>2023-03-22 10:55:26 +0100
committerGitHub <noreply@github.com>2023-03-22 10:55:26 +0100
commit00c38ab3569dea3177a203af60c1006e18f6915f (patch)
tree1b4b57e5657be27c83bc271b84e5850cdce4629c /test/integration/test_ed25519_pkeys.rb
parent03716c1ee450e1a54c55f2c621f75aa9eda0253d (diff)
parentceb7cfd84df62730bd0b8d1d62ed44087c23f9a9 (diff)
downloadnet-ssh-00c38ab3569dea3177a203af60c1006e18f6915f.tar.gz
Merge pull request #904 from net-ssh/mfazekas-try-new-ubuntu
feat: use new ubuntu - jammy in gh actions and vagrant
Diffstat (limited to 'test/integration/test_ed25519_pkeys.rb')
-rw-r--r--test/integration/test_ed25519_pkeys.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/integration/test_ed25519_pkeys.rb b/test/integration/test_ed25519_pkeys.rb
index 0017801..0fee8b0 100644
--- a/test/integration/test_ed25519_pkeys.rb
+++ b/test/integration/test_ed25519_pkeys.rb
@@ -13,8 +13,7 @@ unless ENV['NET_SSH_NO_ED25519']
def test_in_file_no_password
Dir.mktmpdir do |dir|
- sh "rm -rf #{dir}/id_rsa_ed25519 #{dir}/id_rsa_ed25519.pub"
- sh "ssh-keygen -q -f #{dir}/id_rsa_ed25519 -t ed25519 -N ''"
+ ssh_keygen "#{dir}/id_rsa_ed25519", "ed25519"
set_authorized_key('net_ssh_1', "#{dir}/id_rsa_ed25519.pub")
ret = Net::SSH.start("localhost", "net_ssh_1", { keys: "#{dir}/id_rsa_ed25519" }) do |ssh|
@@ -27,8 +26,7 @@ unless ENV['NET_SSH_NO_ED25519']
def test_ssh_agent
Dir.mktmpdir do |dir|
with_agent do
- sh "rm -rf #{dir}/id_rsa_ed25519 #{dir}/id_rsa_ed25519.pub"
- sh "ssh-keygen -q -f #{dir}/id_rsa_ed25519 -t ed25519 -N 'pwd'"
+ ssh_keygen "#{dir}/id_rsa_ed25519", "ed25519"
set_authorized_key('net_ssh_1', "#{dir}/id_rsa_ed25519.pub")
ssh_add("#{dir}/id_rsa_ed25519", "pwd")
@@ -45,8 +43,7 @@ unless ENV['NET_SSH_NO_ED25519']
def test_in_file_with_password
Dir.mktmpdir do |dir|
- sh "rm -rf #{dir}/id_rsa_ed25519 #{dir}/id_rsa_ed25519.pub"
- sh "ssh-keygen -q -f #{dir}/id_rsa_ed25519 -t ed25519 -N 'pwd'"
+ ssh_keygen "#{dir}/id_rsa_ed25519", "ed25519"
set_authorized_key('net_ssh_1', "#{dir}/id_rsa_ed25519.pub")
# TODO: fix bug in net ssh which reads public key even if private key is there