yii2-gsftp Extension for yii2-gftp allowing SFTP connection

  1. Requirements
  2. Usage
  3. Resources

Extension for Yii2-Gftp allowing SFTP connection

Requirements

This extensions requires :

Usage

This extension needs Yii2-Gftp extension to work and registers a new "FTP" driver using SFTP connection.

return [
	// [...]
	'components'=>[
		// [...]
		'ftp' => [
			'class' => '\gftp\FtpComponent',
			'connectionString' => 'sftp://user:pass@host:22',
			'driverOptions' => [ 'timeout' => 120 ]
		]
	],
	// [...]
];

or

return [
	// [...]
	'components'=>[
		// [...]
		'ftp' => [
			'class' => '\gftp\FtpComponent',
			'driverOptions' => [
				'protocol' => \gftp\FtpProtocol::valueOf('sftp'),
				'user' => 'me@somewhere.otrb',
				'pass' => 'PassW0rd',
				'host' => 'ssh.somewhere.otrb',
				'port' => 22,
			],
			'timeout' => 120
		]
	],
	// [...]
];

Resources

0 0
1 follower
0 downloads
Yii Version: 2.0
License: LGPL-3.0
Category: Networking
Tags: ftp, ftps, sftp, yii2
Developed by: Herve
Created on: Jun 24, 2015
Last updated: 8 years ago

Related Extensions