4.5 KiB
name, description
| name | description |
|---|---|
| server-initialize | Выполняет первичную настройку сервера с обновлением системных пакетов или меняет учётные данные и правила доступа по SSH. |
Use the server-ops checkout for all repository paths and commands in this skill.
Before changes
Resolve the endpoint, account, and host pin using server operation. Confirm OS, package manager, and administrative privileges. For SSH changes, retain the working session and a recovery route. Back up the actual SSH configuration outside its include paths before editing it.
Package updates during initialization
A requested initial setup includes refreshing package indexes and upgrading
installed packages. This includes password-to-key setup on a new server.
For Debian or Ubuntu run apt-get update followed by apt-get upgrade.
Use the supported procedure on other distributions. Inspect errors and
held packages. Record completion, pending packages, and required reboots.
Keep package removals, release upgrades, and reboots inside explicit scope.
For an SSH-only change on an established server, apply the requested access
change. Pause a combined cutover if an upgrade failure leaves access or
package state uncertain. APT update and upgrade
Change a key or SSH policy
- Use the requested public key or derive it from the selected local private key. When asked to make a new key, generate the pair in a private temporary directory. Install the public key for the requested account. Preserve the other authorized keys, ownership, and permissions.
- Prove a fresh login with the exact candidate key, existing pin, and
expected privileges. On Linux use
python3 .agents/scripts/ops.py ssh --probe-key PATH ALIAS -- id -un. Use--connection NAMEfor a specific endpoint. A.pubpath selects the matching key inssh-agent. Load a passphrase-protected key into the agent for the non-interactive probe. A private-file probe requires a key that opens without a prompt. Use the PowerShell runner in the operation skill when working on native Windows. - Use the credential commands to
store the private key and verify it with
check-secret ALIASbefore restricting access. Keep the existing working credentials available while testing the stored key with a fresh login and privilege check after package upgrades. Proceed with an external key only if the operator chose it. - Apply the requested SSH policy within scope. Before a server-wide cutover,
verify access for the accounts that must retain it. Validate the running
daemon's config and arguments with
sshd -tandsshd -T -C ..., including real endpoint/user parameters and applicableIncludeandMatchrules. For key-only access, verifyPubkeyAuthentication yes,AuthenticationMethods publickey,PasswordAuthentication no, andKbdInteractiveAuthentication no. Reload via the supported service mechanism. OpenSSH daemon checks · SSH policy options - Verify a fresh pinned login and privileges after reload. On a failed cutover use the retained session or recovery route to restore, validate, reload, and verify the prior configuration. Record the observed partial state or recovery result.
Change a password
Use the platform's account management tool and a protected input channel. Retain recovery access and keep the current SOPS entry until the new credential is verified. Confirm a fresh password login when SSH password access is part of the requested policy. For other password uses, verify with a check appropriate to that use. Store the verified new credential through the SOPS workflow.
Update the record
Update the selected profile or legacy account's auth. With a mapped
auth, set method status from observed results and change auth.default
when switching the intended default. Use encrypted_key for keys stored as
SOPS ciphertext in the card. Preserve operator-selected external key or agent
references and existing legacy SOPS records when applicable.
Before recording server-wide ssh_policy: key_only, reconcile all password
methods with verified policy. Keep old credentials through the final login
check. Update the inventory and HISTORY.md under
servers/<alias>/server-notes/ with package and access evidence and open work.