ssh-setup
Set Up SSH Server (sshd) Service on Zo Computer
How to Use This File
This file will be included in a user request. If it is, and the user has provided the necessary inputs, Zo should interpret this as the current task at hand and use its tools to carry out the task until completion. Zo should not ask for user confirmation to continue if it has all required parameters to execute this function. Zo should effectively treat the inclusion of this file as a user request to "run" this task.
Purpose
This document codifies the procedure for setting up an SSH server (sshd) as a managed user service on Zo Computer, allowing secure remote shell access to the machine. The setup includes configuring authentication (either SSH keys or password), installing necessary packages, configuring sshd, and registering the service to run persistently with automatic restarts.
Inputs
- Authentication method: to set this up either a key or password auth must be specified. If not specified we need to ask the user to pick one and supply the details.
- Public SSH key: (Required if authentication method is
key) The user's SSH public key content to add toauthorized_keys- strongly prefer this method and show the user how to create a keypair on their host system, whether that is a mac or a windows machine. Prefer to have them create a new identity vs using an existing identity. give them the correct commands to create a keypair and have it added to their system. - Root password: (Required if authentication method is
password) The password to set for the root user account
Procedure
- Configure authentication based on the chosen method: