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!

  6. Feodor Fitsner closed this discussion on 11 Aug, 2024 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

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

 

26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM
20 Sep, 2024 05:50 PM