This is the stand way that I have been using to place a file in SFTP
Storage::disk()->put($fileName, file_get_contents($storagePath . $fileName));
But I am facing a situation where for connection first I need pass the key-phrase and post that only SFTP will askfor user_id and password,
How can Is set this up for Jobs in Laravel, Using Laravel 5.1 (due to some issues cant upgrade but that's not the concern as of now)
My Configuration in Filesystem
'new_sftp' => [
'driver' => 'sftp',
'host' => 'homestead',
'port' => 22,
'username' => 'myuser',
'password' => 'mypass',
'root' => /myroot/folder,
'privateKey' => '/home/myroot/myfile.pem',
'password' => 'mypassprase',
'timeout' => '300',
'visibility' => 'public',
'permPublic' => 0766,
],
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3rUT2RG
via IFTTT
Aucun commentaire:
Enregistrer un commentaire