-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
# Onboarding | ||
|
||
The production website is hosted on a remote machine supplied by [the OCF](https://www.ocf.berkeley.edu/). Connecting to this machine requires SSH. | ||
> [!WARNING] | ||
> Running commands in the `hozer` machine can break production! Please continue with caution. | ||
The production website is hosted on a machine supplied by [the OCF](https://www.ocf.berkeley.edu/). This machine will be referenced as `hozer` or `hozer-51` in these docs. Connecting to this machine to accomplish infra-related tasks requires SSH. | ||
|
||
This guide assumes basic experience with SSH. | ||
|
||
> [!WARNING] | ||
> Running commands in the `hozer` machine can break production! Continue with caution. | ||
1. Please ensure your public SSH key has an identifying comment attached, such as your Berkeley email: | ||
```sh | ||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAq8Lwls394thisIsNotARealKey [email protected] | ||
``` | ||
You can directly modify your public key file at `~/.ssh/id_*.pub`, or you can use the following command: | ||
```sh | ||
ssh-keygen -c -C "[email protected]" -f ~/.ssh/id_* | ||
``` | ||
Note that `-f` takes in the path to your *private* key file, but only modifies the *public* key file. | ||
|
||
1. Copy your SSH key to the `hozer` machine's `authorized_keys` file: | ||
2. Copy your SSH key to the `hozer` machine's `authorized_keys` file: | ||
``` | ||
ssh-copy-id [email protected] | ||
``` | ||
The SSH password can be found in the pinned messages of the \#backend staff channel in discord. | ||
> [!IMPORTANT] | ||
> Please add an identifying comment to your public key! For example, your Berkeley email suffices. This helps significantly with key management. | ||
2. (Optional) Add `hozer-51` to your `~/.ssh/config` file: | ||
```bash | ||
3. (Optional) Add `hozer-51` to your `~/.ssh/config` file: | ||
```sh | ||
# Begin Berkeleytime hozer config | ||
Host hozer-?? | ||
HostName %h.ocf.berkeley.edu | ||
User root | ||
# End Berkeleytime hozer config | ||
``` | ||
Now, you can quickly SSH into the remote machine from your terminal: | ||
```bash | ||
```sh | ||
ssh hozer-51 | ||
# as opposed to [email protected] | ||
``` |