diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua b/package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua
index 8617c439f280d0b4c97cbf6f2b50d93f8d86e23e..dfba5e66b7136264287619c9aab3fd733170371b 100644
--- a/package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua
+++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua
@@ -51,7 +51,9 @@ if fs.access("/etc/config/dropbear") then
   end
 
   function keys.remove(self, section)
-    fs.remove("/etc/dropbear/authorized_keys")
+    if keys:formvalue("_keys") then
+      fs.remove("/etc/dropbear/authorized_keys")
+    end
   end
 end