Can't use LFTP with SFTP but SFTP clients allow connections

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm trying to use LFTP (v 4.8.3) to connect to my KVM. This server already allows me to remote execute SSH through terminal and SFTP through FTP client (Transmit app).



I want to do this in order to do CI/CD using GitLab, but LFTP doesn't work in my local machine (macOS Sierra 10.12.6), so neither does in the CI/CD pipeline.



This is what I do:



lftp -d -c "set ftp:ssl-allow true; set ftp:use-feat false; open -u my_user,my_pass -p 22 my_ip; mirror -Rnv /Applications/XAMPP/xamppfiles/htdocs/my-website /var/www/html --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"



And this is what LFTP returns:



---- Resolving host address...
---- 1 address found: my_ip
---- Connecting to my_ip (my_ip) port 22
<--- SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
mkdir `/var/www/html' [TLS negotiation...]



It hangs like that for a couple minutes and then it returns this:



[same lines as ^ before]
**** Peer closed connection <–––––––––––––––
---- Resolving host address...
[etc]



And that's it. Seems like it can hang out in that "connect–TLS negotiation–disconnect" loop for ever.



UFW doesn't block the SSH connection, and I don't see any error in the log file. I tried opening SSH port to anyone, but still not success. I tried rsync but is not useful because it asks me for the SSH user's password and I can't set that using GitLab's .gitlab-ci.yml configuration file.



I don't know what else I can do. I want to use LFTP but I'm open to other options like cURL or Wget.







share|improve this question



















  • you're doing a confusion between the ftp protocol (with or without ssl) and the sftp protocol. try lftp sftp://user@host/
    – A.B
    May 17 at 17:42











  • Yeah, I tried that, but still not useful because that asks for a password and I cannot set it from the GitLab's .gitlab-ci.yml configuration file.
    – Jimmy Adaro
    May 17 at 20:57










  • you should think a bit more on "ftp" versus "sftp" and what I really meant to convey
    – A.B
    May 17 at 21:41














up vote
0
down vote

favorite












I'm trying to use LFTP (v 4.8.3) to connect to my KVM. This server already allows me to remote execute SSH through terminal and SFTP through FTP client (Transmit app).



I want to do this in order to do CI/CD using GitLab, but LFTP doesn't work in my local machine (macOS Sierra 10.12.6), so neither does in the CI/CD pipeline.



This is what I do:



lftp -d -c "set ftp:ssl-allow true; set ftp:use-feat false; open -u my_user,my_pass -p 22 my_ip; mirror -Rnv /Applications/XAMPP/xamppfiles/htdocs/my-website /var/www/html --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"



And this is what LFTP returns:



---- Resolving host address...
---- 1 address found: my_ip
---- Connecting to my_ip (my_ip) port 22
<--- SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
mkdir `/var/www/html' [TLS negotiation...]



It hangs like that for a couple minutes and then it returns this:



[same lines as ^ before]
**** Peer closed connection <–––––––––––––––
---- Resolving host address...
[etc]



And that's it. Seems like it can hang out in that "connect–TLS negotiation–disconnect" loop for ever.



UFW doesn't block the SSH connection, and I don't see any error in the log file. I tried opening SSH port to anyone, but still not success. I tried rsync but is not useful because it asks me for the SSH user's password and I can't set that using GitLab's .gitlab-ci.yml configuration file.



I don't know what else I can do. I want to use LFTP but I'm open to other options like cURL or Wget.







share|improve this question



















  • you're doing a confusion between the ftp protocol (with or without ssl) and the sftp protocol. try lftp sftp://user@host/
    – A.B
    May 17 at 17:42











  • Yeah, I tried that, but still not useful because that asks for a password and I cannot set it from the GitLab's .gitlab-ci.yml configuration file.
    – Jimmy Adaro
    May 17 at 20:57










  • you should think a bit more on "ftp" versus "sftp" and what I really meant to convey
    – A.B
    May 17 at 21:41












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to use LFTP (v 4.8.3) to connect to my KVM. This server already allows me to remote execute SSH through terminal and SFTP through FTP client (Transmit app).



I want to do this in order to do CI/CD using GitLab, but LFTP doesn't work in my local machine (macOS Sierra 10.12.6), so neither does in the CI/CD pipeline.



This is what I do:



lftp -d -c "set ftp:ssl-allow true; set ftp:use-feat false; open -u my_user,my_pass -p 22 my_ip; mirror -Rnv /Applications/XAMPP/xamppfiles/htdocs/my-website /var/www/html --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"



And this is what LFTP returns:



---- Resolving host address...
---- 1 address found: my_ip
---- Connecting to my_ip (my_ip) port 22
<--- SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
mkdir `/var/www/html' [TLS negotiation...]



It hangs like that for a couple minutes and then it returns this:



[same lines as ^ before]
**** Peer closed connection <–––––––––––––––
---- Resolving host address...
[etc]



And that's it. Seems like it can hang out in that "connect–TLS negotiation–disconnect" loop for ever.



UFW doesn't block the SSH connection, and I don't see any error in the log file. I tried opening SSH port to anyone, but still not success. I tried rsync but is not useful because it asks me for the SSH user's password and I can't set that using GitLab's .gitlab-ci.yml configuration file.



I don't know what else I can do. I want to use LFTP but I'm open to other options like cURL or Wget.







share|improve this question











I'm trying to use LFTP (v 4.8.3) to connect to my KVM. This server already allows me to remote execute SSH through terminal and SFTP through FTP client (Transmit app).



I want to do this in order to do CI/CD using GitLab, but LFTP doesn't work in my local machine (macOS Sierra 10.12.6), so neither does in the CI/CD pipeline.



This is what I do:



lftp -d -c "set ftp:ssl-allow true; set ftp:use-feat false; open -u my_user,my_pass -p 22 my_ip; mirror -Rnv /Applications/XAMPP/xamppfiles/htdocs/my-website /var/www/html --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"



And this is what LFTP returns:



---- Resolving host address...
---- 1 address found: my_ip
---- Connecting to my_ip (my_ip) port 22
<--- SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
mkdir `/var/www/html' [TLS negotiation...]



It hangs like that for a couple minutes and then it returns this:



[same lines as ^ before]
**** Peer closed connection <–––––––––––––––
---- Resolving host address...
[etc]



And that's it. Seems like it can hang out in that "connect–TLS negotiation–disconnect" loop for ever.



UFW doesn't block the SSH connection, and I don't see any error in the log file. I tried opening SSH port to anyone, but still not success. I tried rsync but is not useful because it asks me for the SSH user's password and I can't set that using GitLab's .gitlab-ci.yml configuration file.



I don't know what else I can do. I want to use LFTP but I'm open to other options like cURL or Wget.









share|improve this question










share|improve this question




share|improve this question









asked May 17 at 16:26









Jimmy Adaro

11




11











  • you're doing a confusion between the ftp protocol (with or without ssl) and the sftp protocol. try lftp sftp://user@host/
    – A.B
    May 17 at 17:42











  • Yeah, I tried that, but still not useful because that asks for a password and I cannot set it from the GitLab's .gitlab-ci.yml configuration file.
    – Jimmy Adaro
    May 17 at 20:57










  • you should think a bit more on "ftp" versus "sftp" and what I really meant to convey
    – A.B
    May 17 at 21:41
















  • you're doing a confusion between the ftp protocol (with or without ssl) and the sftp protocol. try lftp sftp://user@host/
    – A.B
    May 17 at 17:42











  • Yeah, I tried that, but still not useful because that asks for a password and I cannot set it from the GitLab's .gitlab-ci.yml configuration file.
    – Jimmy Adaro
    May 17 at 20:57










  • you should think a bit more on "ftp" versus "sftp" and what I really meant to convey
    – A.B
    May 17 at 21:41















you're doing a confusion between the ftp protocol (with or without ssl) and the sftp protocol. try lftp sftp://user@host/
– A.B
May 17 at 17:42





you're doing a confusion between the ftp protocol (with or without ssl) and the sftp protocol. try lftp sftp://user@host/
– A.B
May 17 at 17:42













Yeah, I tried that, but still not useful because that asks for a password and I cannot set it from the GitLab's .gitlab-ci.yml configuration file.
– Jimmy Adaro
May 17 at 20:57




Yeah, I tried that, but still not useful because that asks for a password and I cannot set it from the GitLab's .gitlab-ci.yml configuration file.
– Jimmy Adaro
May 17 at 20:57












you should think a bit more on "ftp" versus "sftp" and what I really meant to convey
– A.B
May 17 at 21:41




you should think a bit more on "ftp" versus "sftp" and what I really meant to convey
– A.B
May 17 at 21:41










1 Answer
1






active

oldest

votes

















up vote
0
down vote













In you current command, lftp is not using sftp, which would be FTP over the SSH protocol, but ftps which is FTP over SSL.



For lftp to work as an sftp client, you would need to add sftp:// to the host you are connecting to.



If you want FTP over SSL, you would need to change the port in your command from port 22 to the FTP port (21 by default).






share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444421%2fcant-use-lftp-with-sftp-but-sftp-clients-allow-connections%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    In you current command, lftp is not using sftp, which would be FTP over the SSH protocol, but ftps which is FTP over SSL.



    For lftp to work as an sftp client, you would need to add sftp:// to the host you are connecting to.



    If you want FTP over SSL, you would need to change the port in your command from port 22 to the FTP port (21 by default).






    share|improve this answer

























      up vote
      0
      down vote













      In you current command, lftp is not using sftp, which would be FTP over the SSH protocol, but ftps which is FTP over SSL.



      For lftp to work as an sftp client, you would need to add sftp:// to the host you are connecting to.



      If you want FTP over SSL, you would need to change the port in your command from port 22 to the FTP port (21 by default).






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        In you current command, lftp is not using sftp, which would be FTP over the SSH protocol, but ftps which is FTP over SSL.



        For lftp to work as an sftp client, you would need to add sftp:// to the host you are connecting to.



        If you want FTP over SSL, you would need to change the port in your command from port 22 to the FTP port (21 by default).






        share|improve this answer













        In you current command, lftp is not using sftp, which would be FTP over the SSH protocol, but ftps which is FTP over SSL.



        For lftp to work as an sftp client, you would need to add sftp:// to the host you are connecting to.



        If you want FTP over SSL, you would need to change the port in your command from port 22 to the FTP port (21 by default).







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered May 17 at 21:19









        GracefulRestart

        72417




        72417






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444421%2fcant-use-lftp-with-sftp-but-sftp-clients-allow-connections%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?