Cannot connect SFTP server: An established connection was aborted by the server.

Heiko's Avatar

Heiko

15 May, 2024 07:22 PM

Hallo,

I am currently experiencing this error: Cannot connect SFTP server: An established connection was aborted by the server.

I double checked that the password is correct (encryption lead to the same secret value twice).

What can I do to debug this?

  1. Support Staff 1 Posted by Feodor Fitsner on 15 May, 2024 09:46 PM

    Feodor Fitsner's Avatar

    Are you deploying from a build or deployment environment?

  2. 2 Posted by Heiko Voigt on 16 May, 2024 09:34 PM

    Heiko Voigt's Avatar

    The configuration is in my appveyor.yaml, so I guess it is from a build environment?

    On Mai 15 2024, at 11:46 pm, Feodor Fitsner <[email blocked]> wrote:

  3. Support Staff 3 Posted by Feodor Fitsner on 17 May, 2024 06:43 PM

    Feodor Fitsner's Avatar

    It could be some incompatibility or lack of features in SFTP library used by AppVeyor build agent. .NET implementation of SFTP has been always behind the latest standards.

    I'd like to recommend you configuring WinSCP for SFTP uploads: https://help.appveyor.com/discussions/problems/33606-try-to-deploy-...

  4. 4 Posted by Heiko Voigt on 06 Jun, 2024 09:43 PM

    Heiko Voigt's Avatar

    Thanks. Your tip helped, my deploy_scripts now look like this:

    Windows
    deploy_script:
    - cmd: |
    choco install -y winscp
    echo open sftp://appveyor:%DEPLOY_PASS%@<ssh-server>/ -hostkey="<hostkey (shown when running without this option)>" > ftp.txt
    echo put installer\* %deploy_prefix%build/ >> ftp.txt
    echo exit >> ftp.txt
    "C:\Program Files (x86)\WinSCP\winscp.com" /script=ftp.txt
    Linux
    deploy_script:
    - sh: |
    sudo apt-get -y install sshpass
    ssh-keygen -f "/home/appveyor/.ssh/known_hosts" -R "<ssh-server>"
    printf "%s" "$DEPLOY_PASS" >/tmp/deploy_password
    sshpass -f "/tmp/deploy_password" scp -r installer/* appveyor@<ssh-server>:${deploy_prefix}build/
    Mac OS X
    deploy_script:
    - sh: |
    brew install sshpass
    ssh-keygen -f "/Users/appveyor/.ssh/known_hosts" -R "<ssh-server>"
    printf "%s" "$DEPLOY_PASS" >/tmp/deploy_password
    sshpass -f "/tmp/deploy_password" scp -r installer/* appveyor@<ssh-server>:${deploy_prefix}build/
    Maybe this is also helpful for others?

    Thanks Heiko

    On Mai 17 2024, at 8:43 pm, Feodor Fitsner <[email blocked]> wrote:

  5. Support Staff 5 Posted by Feodor Fitsner on 10 Jun, 2024 11:54 PM

    Feodor Fitsner's Avatar

    Thanks for letting know and sharing the solution!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac