Skip to content

[Windows] Several fixes for the SSH known_hosts files#13154

Merged
erik-bershel merged 2 commits intoactions:mainfrom
tvalenta:tvalenta/utf16_to_ascii
Jan 30, 2026
Merged

[Windows] Several fixes for the SSH known_hosts files#13154
erik-bershel merged 2 commits intoactions:mainfrom
tvalenta:tvalenta/utf16_to_ascii

Conversation

@tvalenta
Copy link
Contributor

@tvalenta tvalenta commented Oct 9, 2025

Description

This is a bugfix and improvement on the ssh host keys for GitHub and Azure that are added to Windows images.

  1. Ensure the ssh_known_hosts files are plain-text with no BOM Powershell's redirect was creating a file with UTF16 encoding. (bugfix)
  2. Create a ssh_known_hosts file for the ssh application included with Windows. (improvement)
  3. Use ssh-keyscan from the Git for Windows installation so keys from github.com can be added. (improvement?)

Related issue: #13072

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

1. Ensure the ssh_known_hosts files are plain-text with no BOM
Powershell's redirect was creating a file with UTF16 encoding.
1. Create a ssh_known_hosts file for the ssh application included with
Windows.
1. Use ssh-keyscan from the Git for Windows installation so keys from
github.com can be added. Relates to
#13072
@tvalenta tvalenta changed the title Several fixes for the SSH known_hosts files on Windows [Windows] Several fixes for the SSH known_hosts files Oct 9, 2025
@actions actions deleted a comment from quangkk19x-tech Nov 5, 2025
@v-GeorgyPuzakov
Copy link

Hello @tvalenta,

Could you write tests to check if this is implemented correctly? We will add it to our pipeline

@v-GeorgyPuzakov
Copy link

Hi @tvalenta,

Also, Could you rebase you PR?

@erik-bershel erik-bershel merged commit 2706c43 into actions:main Jan 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants