 
   KNOWN_FIELD_TYPES   =
     'ssh_private_key' : 'textarea'
+
+  injectCustomActions = (requiredFields, buttons, callback) ->
+
+    if 'ssh_public_key' in requiredFields
+
+      buttons['Auto Generate SSH Keys'] =
+        style    : 'solid medium green'
+        type     : 'button'
+        loader   : yes
+        tooltip  :
+          title  : "This stack requires SSH keys that you
+                    can automatically create one from here"
+        callback : ->
+
+          endPoint = '/api/social/sshkeys'
+          type     = 'GET'
+
+          doXhrRequest { endPoint, type }, (err, res) =>
+
+            @hideLoader()
+            return  if showError err, KodingError: 'Service not available'
+
+            callback
+              'ssh_public_key'  : res.public
+              'ssh_private_key' : res.private
+
+    return buttons
+
 
   @generateAddCredentialFormFor = (options) ->
 

showError            = require 'app/util/showError'
isLoggedIn           = require 'app/util/isLoggedIn'
applyMarkdown        = require 'app/util/applyMarkdown'


MissingDataView      = require './missingdataview'


        selectOptions.push { field, values }

    buttons      =
      Save       :
        title    : "Save"
