shopware5 / SwagMediaSftp

MIT License
12 stars 6 forks source link

Could not login with username, Log is fine #11

Closed bitbrewDE closed 3 years ago

bitbrewDE commented 3 years ago

Hello Guys.

I get a strange error.

Oops! An error has occurred! The following notes should help you. Could not login with username: [USERNAME], host: [HOST] in custom/plugins/SwagMediaSftp/vendor/league/flysystem-sftp/src/SftpAdapter.php on line 233 Stack trace: #0 custom/plugins/SwagMediaSftp/vendor/league/flysystem-sftp/src/SftpAdapter.php(195):

But the Log tells, that the adapter connects correctly:

Connection from xyz port 30662 on zzz port 22 Accepted password for USER from xzy port 30662 ssh2 User child is on pid 419902 Starting session: subsystem 'sftp' for USER from xyz port 30662 id 0 Close session: user sUSER from xyz port 30662 id 0

Here is my config

'cdn' => [
    'backend' => 'sftp',
    'adapters' => [
        'sftp' => [
            'type' => 'sftp',
            'mediaUrl' => 'https://images.myurl.tld',
            'host' => 'hostname.tld',
            'port' => 22,
            'username' => 'user',
            'password' => 'password',
            'root' => '/PATH-TO-SHOPWARE-ROOT/', _(is that correct, or should i use /media/ also?)_
            'timeout' => 10
        ]
    ]
]
bitbrewDE commented 3 years ago

I used a private key also and it worked for me.