diff --git a/Gemfile b/Gemfile
index 90fa659fe78ab05abd6bfacb88bc40464fdaf136..91c26f6c5a45bac138328c510ffbc85a67222c3b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -404,13 +404,12 @@ gem 'vmstat', '~> 2.3.0'
 gem 'sys-filesystem', '~> 1.1.6'
 
 # SSH host key support
-gem 'net-ssh', '~> 4.2.0'
+gem 'net-ssh', '~> 5.0'
 gem 'sshkey', '~> 1.9.0'
 
 # Required for ED25519 SSH host key support
 group :ed25519 do
-  gem 'rbnacl-libsodium'
-  gem 'rbnacl', '~> 4.0'
+  gem 'ed25519', '~> 1.2'
   gem 'bcrypt_pbkdf', '~> 1.0'
 end
 
diff --git a/Gemfile.lock b/Gemfile.lock
index 2daaa3b516e1928c390b43b0810d03a59f50c99c..0cd037569f951dc4fdcf979b931d655c30b12cbf 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -177,6 +177,7 @@ GEM
       json-jwt (~> 1.6)
     dropzonejs-rails (0.7.2)
       rails (> 3.1)
+    ed25519 (1.2.4)
     email_reply_trimmer (0.1.6)
     email_spec (2.2.0)
       htmlentities (~> 4.3.3)
@@ -506,7 +507,7 @@ GEM
       mustermann (~> 1.0.0)
     mysql2 (0.4.10)
     net-ldap (0.16.0)
-    net-ssh (4.2.0)
+    net-ssh (5.0.1)
     netrc (0.11.0)
     nokogiri (1.8.2)
       mini_portile2 (~> 2.3.0)
@@ -692,10 +693,6 @@ GEM
       ffi (>= 0.5.0, < 2)
     rblineprof (0.3.6)
       debugger-ruby_core_source (~> 1.3)
-    rbnacl (4.0.2)
-      ffi
-    rbnacl-libsodium (1.0.11)
-      rbnacl (>= 3.0.1)
     rdoc (6.0.4)
     re2 (1.1.1)
     recaptcha (3.0.0)
@@ -1012,6 +1009,7 @@ DEPENDENCIES
   doorkeeper (~> 4.3)
   doorkeeper-openid_connect (~> 1.3)
   dropzonejs-rails (~> 0.7.1)
+  ed25519 (~> 1.2)
   email_reply_trimmer (~> 0.1)
   email_spec (~> 2.2.0)
   factory_bot_rails (~> 4.8.2)
@@ -1082,7 +1080,7 @@ DEPENDENCIES
   mousetrap-rails (~> 1.4.6)
   mysql2 (~> 0.4.10)
   net-ldap
-  net-ssh (~> 4.2.0)
+  net-ssh (~> 5.0)
   nokogiri (~> 1.8.2)
   oauth2 (~> 1.4)
   octokit (~> 4.9)
@@ -1124,8 +1122,6 @@ DEPENDENCIES
   rainbow (~> 2.2)
   raindrops (~> 0.18)
   rblineprof (~> 0.3.6)
-  rbnacl (~> 4.0)
-  rbnacl-libsodium
   rdoc (~> 6.0)
   re2 (~> 1.1.1)
   recaptcha (~> 3.0)
diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock
index 14ea3e4519c55dc7493b1ed60b4ccf243b04f36b..bee13dd1d5371c6fab95a206330669b3ebf01183 100644
--- a/Gemfile.rails5.lock
+++ b/Gemfile.rails5.lock
@@ -179,6 +179,7 @@ GEM
       json-jwt (~> 1.6)
     dropzonejs-rails (0.7.4)
       rails (> 3.1)
+    ed25519 (1.2.4)
     email_reply_trimmer (0.1.10)
     email_spec (2.2.0)
       htmlentities (~> 4.3.3)
@@ -505,7 +506,7 @@ GEM
       mustermann (~> 1.0.0)
     mysql2 (0.4.10)
     net-ldap (0.16.1)
-    net-ssh (4.2.0)
+    net-ssh (5.0.1)
     netrc (0.11.0)
     nio4r (2.3.1)
     nokogiri (1.8.2)
@@ -696,10 +697,6 @@ GEM
       ffi (>= 0.5.0, < 2)
     rblineprof (0.3.7)
       debugger-ruby_core_source (~> 1.3)
-    rbnacl (4.0.2)
-      ffi
-    rbnacl-libsodium (1.0.16)
-      rbnacl (>= 3.0.1)
     rdoc (6.0.4)
     re2 (1.1.1)
     recaptcha (3.4.0)
@@ -1017,6 +1014,7 @@ DEPENDENCIES
   doorkeeper (~> 4.3)
   doorkeeper-openid_connect (~> 1.3)
   dropzonejs-rails (~> 0.7.1)
+  ed25519 (~> 1.2)
   email_reply_trimmer (~> 0.1)
   email_spec (~> 2.2.0)
   factory_bot_rails (~> 4.8.2)
@@ -1087,7 +1085,7 @@ DEPENDENCIES
   mousetrap-rails (~> 1.4.6)
   mysql2 (~> 0.4.10)
   net-ldap
-  net-ssh (~> 4.2.0)
+  net-ssh (~> 5.0)
   nokogiri (~> 1.8.2)
   oauth2 (~> 1.4)
   octokit (~> 4.9)
@@ -1130,8 +1128,6 @@ DEPENDENCIES
   rainbow (~> 2.2)
   raindrops (~> 0.18)
   rblineprof (~> 0.3.6)
-  rbnacl (~> 4.0)
-  rbnacl-libsodium
   rdoc (~> 6.0)
   re2 (~> 1.1.1)
   recaptcha (~> 3.0)