0

I'm using lftp to connect to an sftp server but I get a "no matching ciphers" error, and need to specify which cipher is used.

Using sftp the command to connect would look like this:

sftp -c aes256-cbc sftp://sftpserver:10

How can I connect with that cipher using lftp? I can't find anything about ciphers or how to specify which encryption to use and let lftp pass it to ssh. I'm looking for something similar to sftp's option -o that passes and option to ssh.

2
  • 1
    Doesn't the error say that there's no cipher that the lftp and the server can agree upon? You may need to upgrade the lftp or the server. Or what exactly is the behaviour of sftp without the -c aes256-cbc? – Martin Prikryl Feb 15 at 13:18
  • Without the -c-switch sftp I can't connect, but I get a message saying "Their offer" includes aes256-cbc, and when I specify the switch it works. I guess you're wondering why sftp does't use that cipher directly? I have no idea ... – PetaspeedBeaver Feb 16 at 14:56
1

Read man lftp and see set sftp:connect-program. Here's my example (a shell wrapper around lftp) from which you can get idea how to use it, in my case I used lftp to sftp via a jumpbox.

...
sshargs="ssh -F ${tmpdir}/.ssh/config -J "
sshargs+="${JUMPBOX_USER}@${JUMPBOX_HOST}"

export LFTP_HOME=${tmpdir}
cat > ${tmpdir}/rc <<EOF
set sftp:connect-program ${sshargs}
EOF

lftp -c "
open -u ${WEBSERVER_USER},whatever sftp://${WEBSERVER_HOST}${DEST_DIR}
cd ${SRC_DIR} && mirror --dry-run -R --ignore-size -L --no-perms --no-umask
bye
"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.