Issue to SFTP command

Jonathan 300 Reputation points
2026-08-07T04:41:11.1933333+00:00

Hi,

Any issue to the command below? What to adjust?

C:\Windows\system32>sftp -p peter@1?.???:22

peter@1?.???'s password:

Connection reset by 1?.??? port 22

Connection closed

Windows for business | Windows Server | Networking | Network connectivity and file sharing
0 comments No comments

1 answer

Sort by: Most helpful
  1. AlexCodex 0 Reputation points
    2026-08-07T06:35:16.69+00:00

    The syntax looks valid, so the "Connection reset by ... port 22" message usually means the server is closing the connection rather than there being a problem with the sftp command itself.

    A few things to check:

    • Verify that the SFTP service is running and listening on port 22.
    • Confirm the hostname/IP is correct and reachable (ping or Test-NetConnection <host> -Port 22).
    • Make sure the server allows SFTP/SSH connections from your client IP.
    • Check the SSH/SFTP server logs for the reason the connection was reset (authentication, firewall, or security policy).

    If possible, could you share which SFTP server software you're connecting to (OpenSSH, Bitvise, etc.) and the exact command with the hostname masked? That would help narrow it down.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.