Skip to content

SftpClient hangs on Connect/ConnectAsync to atmoz/sftp server #1732

Description

@TMS-Namespace

Happened on Fedora 42 (did not test on other OSs if matters), when I spin up atmoz/sftp docker image, and try to connect to it.

Connecting via Linux sftp -P <port> <user>:localhost to the same docker works perfectly fine.

In the atmoz/sftp logs, I see that the client actually authenticates:

[/entrypoint] Executing sshd
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.
Accepted password for testuser from 172.17.0.1 port 50554 ssh2

However, it will not release Connect/ConnectAsync afterwards.

Configuring timeout in ConnectionInfo or for CancelationTokenSource, has not effect.

Using same SftpClient to connect to another locally spined SFTP, but using SFTP Go server, works fine.

Tried this with multiple SSH.NET versions, from latest back to mid 2024, same behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions