sftp equivalent of lftp command returns Permission denied

683 Views Asked by At

My task is to port working lftp command to it's sftp equivalent. I have a private key generated at ~/key.key.

Working lftp command:

lftp -u Username,'pass' xxx.xxx.xx.xx ssl:key-file key.key

Not working sftp equivalent:

sftp -i ~/key.key [email protected]

The sftp command asks me for a password, i provide the same one available in lftp command and the process exits with Permission denied (publickey,password,keyboard-interactive).

Is there any way i can debug what's happening or maybe something very obvious I'm doing wrong? Thanks in advance for any clues.

1

There are 1 best solutions below

1
On BEST ANSWER

You seem to be use using FTPS (FTP over TLS/SSL) with lftp, not SFTP (over SSH).

OpenSSH sftp is SFTP-only, it does not support FTPS. Those are completely different protocols.