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 Username@xxx.xxx.xx.xx
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.
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.