Skip to content

b3sty191/zed-windows-ssh-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Zed SSH Fixer for Windows Server

A simple automated batch script to fix the Failed to connect over SSH (Client exited with exit_code 1) error when using Zed Editor's remote development feature to connect from macOS/Linux to a Windows Server.

⚠️ The Problem

When Zed tries to connect to a Windows machine via SSH, it often fails and drops the connection with exit_code 1. This usually happens because:

  1. Windows OpenSSH defaults to cmd.exe, which Zed's remote server protocol might struggle with.
  2. Unnecessary output or progress bars from the shell disrupt the connection stream.

🛠️ What fixer.bat Does

This script runs a single PowerShell command with Administrator privileges to:

  • Set PowerShell as the default shell for OpenSSH via the Windows Registry (HKLM:\SOFTWARE\OpenSSH).
  • Create a PowerShell profile (if it doesn't exist).
  • Add $ProgressPreference = "SilentlyContinue" to the profile to suppress noisy progress bars that break the SSH stream.

🚀 Usage Instructions

You must run this script on your target Windows Server.

  1. Download the fixer.bat file to your Windows machine.
  2. Right-click on fixer.bat and select Run as administrator. (The script will automatically check for admin rights and warn you if you forget).
  3. Once the script says [SUCCESS], restart the SSH service to apply changes. You can do this by opening PowerShell and running:
    Restart-Service sshd

About

Resolves Zed SSH exit_code 1 by setting PowerShell as the default OpenSSH shell on Windows.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors