]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #13190 from is-apps/master-sftp-key
authorVincent Petry <pvince81@owncloud.com>
Tue, 10 Feb 2015 15:44:29 +0000 (16:44 +0100)
committerVincent Petry <pvince81@owncloud.com>
Tue, 10 Feb 2015 15:44:29 +0000 (16:44 +0100)
Add SFTP public key authentication support

1  2 
apps/files_external/appinfo/app.php

index cb882463a1a80e929f25ab38cb83912d7c849f06,74f0e337a1294d1d38a7263ec3a956fe7da29a9c..70f6b0159a6f75721ac106ab28ce327ba2ad5159
@@@ -192,9 -176,19 +193,21 @@@ OC_Mount_Config::registerBackend('\OC\F
                'host' => (string)$l->t('Host'),
                'user' => (string)$l->t('Username'),
                'password' => '*'.$l->t('Password'),
 -              'root' => '&'.$l->t('Remote subfolder'))));
 +              'root' => '&'.$l->t('Remote subfolder'),
 +      ],
 +]);
  
+ OC_Mount_Config::registerBackend('\OC\Files\Storage\SFTP_Key', [
+       'backend' => 'SFTP with secret key login',
+       'priority' => 100,
+       'configuration' => array(
+               'host' => (string)$l->t('Host'),
+               'user' => (string)$l->t('Username'),
+               'public_key' => (string)$l->t('Public key'),
+               'private_key' => '#private_key',
+               'root' => '&'.$l->t('Remote subfolder')),
+       'custom' => 'sftp_key',
+       ]
+ );
  $mountProvider = new \OCA\Files_External\Config\ConfigAdapter();
  \OC::$server->getMountProviderCollection()->registerProvider($mountProvider);