mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-12 02:51:16 +10:00
* Point OpenSSH key setup at the file sshd actually reads The Remote Access feature created %USERPROFILE%\.ssh\authorized_keys and told the user to put their public keys there. sshd does not read that file for a member of the administrators group; the "Match Group administrators" block in sshd_config sends those logons to C:\ProgramData\ssh\administrators_authorized_keys instead. WinUtil always relaunches itself elevated, so the account it was setting up is always an administrator, and key auth for it never worked. The function tried to work around that by commenting the block out, but those regexes anchor on $, and .NET puts $ before the \n of a CRLF pair. The sshd_config Windows ships is CRLF throughout, so the replace was a silent no-op on a stock install. On an sshd_config with LF endings it did apply, and that is worse than not working: sshd gives an administrator logon a full token with no UAC prompt, which is why Windows keeps those keys in ProgramData behind an ACL that requires elevation to write. Moving the lookup into the profile lets anything running as the user at medium integrity append a key and get an elevated shell unprompted. Use administrators_authorized_keys and give it the ACL sshd requires (inheritance off, Administrators and SYSTEM only, by SID so localized installs work). Where the sshd_config edit did land, undo it and copy any keys out of the profile file first so key auth is not cut off mid-session. Keys are only copied when the block needs restoring, so a default config never grants access sshd was not already granting. Also stop creating the profile .ssh directory: under elevation it was the elevating administrator's profile, not necessarily the caller's. * Document where to put SSH keys for the OpenSSH server feature
Starlight Starter Kit: Basics
npm create astro@latest -- --template starlight
🧑🚀 Seasoned astronaut? Delete this file. Have fun!
🚀 Project Structure
Inside of your Astro + Starlight project, you'll see the following folders and files:
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ └── docs/
│ └── content.config.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
Starlight looks for .md or .mdx files in the src/content/docs/ directory. Each file is exposed as a route based on its file name.
Images can be added to src/assets/ and embedded in Markdown with a relative link.
Static assets, like favicons, can be placed in the public/ directory.
🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run CLI commands like astro add, astro check |
npm run astro -- --help |
Get help using the Astro CLI |
👀 Want to learn more?
Check out Starlight’s docs, read the Astro documentation, or jump into the Astro Discord server.