PowerShell / PowerShell/Win32-OpenSSH

WinSCP gets Received too large SFTP packet

Open
#1,674 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

If you have anything producing output from any of your Powershell profiles, you risk getting this error:

Received too large (172781415 B) SFTP packet. Max supported packet size is 102400 B

when using WinSCP to try to connect to server.

This is because the -NoLogo -NoProfile pwsh options are not respected when coming from Subsystem in sshd_config, thus spewing out all my profile output into the session.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the WinSCP SFTP connection with output-producing PowerShell profiles, then inspect the sshd_config Subsystem handling and how the pwsh invocation receives -NoLogo and -NoProfile. Done means profile output no longer enters the SFTP session and the connection succeeds without the oversized-packet error.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.