Share the public key with the target server.
To use the SSH key pair created in the previous step, the contents of the public key must be saved to a file on the target server. The steps to do this vary, based on the target server’s OS.
The steps below show you how to deploy the public key on a Windows system in the most basic way—by manually copying & pasting the key’s contents. Alternatively, you may use PowerShell or another command line tool to deploy the public key. For PowerShell instructions, please see Key-based authentication in OpenSSH for Windows.
Please follow these steps to manually share the public key:
- On Room Alert Manager’s host system, open the public key file in a text editor program, such as Notepad.
- Copy the entire contents of the public key to your clipboard.
- Then on the target system, either locate the existing “authorized keys” file or create one if needed.
- The file name & location depends on whether the user account is a member of the local administrators group or a standard user account.
- For a standard user, the authorized_keys file is located in the .ssh folder of the user’s directory.
- For an admin user, the administrators_authorized_keys file is located in the system’s main ssh directory.
- Note that only the local system and administrators security group should have permissions to access the administrators_authorized_keys file.
- Open the authorized keys file in a text editor, such as Notepad, with administrator privileges.
- Paste the entire contents of the public key at the bottom of the authorized keys file.
- Save the changes to the file.
- Restart the SSH Server daemon to apply the public key.