Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Server Editor Account Setup: Difference between revisions

From Monster Hunter Renewal
Added editor account setu page (raw)
 
Updates to include full setup (raw).
Line 21: Line 21:
2. You will be asked to *"Enter file in which to save the key"*. Press enter for default location. (Advanced Users can customise that to their own ability).
2. You will be asked to *"Enter file in which to save the key"*. Press enter for default location. (Advanced Users can customise that to their own ability).


3. If you already have key in given location don't agree to Override (Skip to **[Account Setup and Verification](https://discord.com/channels/932246672392740917/1223025940825641105)** section.
3. If you already have key in given location don't agree to Override (Skip to **[Account Setup and Verification]** section).


4. Set passphrase when asked to, this will encrypt your key and act as a password. (Not mandatory step but highly recommended.
4. Set passphrase when asked to, this will encrypt your key and act as a password. (Not mandatory step but highly recommended.
Line 28: Line 28:


Your identification has been saved in .../.../username/.ssh/id_rsa.
Your identification has been saved in .../.../username/.ssh/id_rsa.
Your public key has been saved in .../.../username/.ssh/id_rsa.pub.
Your public key has been saved in .../.../username/.ssh/id_rsa.pub.
The key fingerprint is:
The key fingerprint is:
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx username@hostname
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx username@hostname
The key's randomart image is
The key's randomart image is


Proceed to **[Account Setup and Verification](https://discord.com/channels/932246672392740917/1223025940825641105)** section.
Proceed to **[Account Setup and Verification]** section.


NOTE: Private key `id_rsa` is your unique identity, this file should be kept secret and never shared with anyone. Public key from pair is stored in `id_rsa.pub` file. This will be used to setup ssh authentication.*
NOTE: Private key `id_rsa` is your unique identity, this file should be kept secret and never shared with anyone. Public key from pair is stored in `id_rsa.pub` file. This will be used to setup ssh authentication.*
Notify @🧰 Server Admin in #💠┃community-chat. Provide your `id_rsa.pub` key in **direct message** to admin handling your request.
While account is being set up head to **[PuTTY]** to prepare tunnel.
<nowiki>**</nowiki>[Terminal SSH Session]** will work only when admin is done.
<nowiki>**</nowiki>Convert OpenSSH key to PPK**
1. Download [package](<nowiki>https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html</nowiki>) for your system and install.
2. Open __puttygen.exe__ from PuTTY installation directory.
3. Click __File__ > __Load private key__.
4. Change type of browsed file in bottom right from __PuTTY Private Key Files (\*.ppk)__ to __All Files (\*.\*)__ and select your **private** `id_rsa` key file.
5. Enter passphrase if asked to. On sucess you will see:
```
Successfully imported foreign key
(OpenSSH SSH-2 private key (old PEM format)).
To use this key with PuTTY, you need to
use the "Save private key" command to
save it in PuTTY's own format.
```
6. Click __Save private key__.
7. Save as .ppk preferably in same directory as your OpenSSH key.
<nowiki>**</nowiki>SSH Tunnel**
1. Open PuTTY.
2. Expand __SSH__ list on left panel.
3. In left panel expand __Connection__ > __SSH__ and click __Auth__.
4. Click __Browse__.
5. Select your converted .ppk private key. If you cant see __Browse__ in __Auth__, expand it and click __Credentials__. Its first field __Browse__.
6. In __SSH__ click __Tunnels__.
7. Set __Source Port__ to `server_port`.
8. Set __Destination__ to `127.0.0.1:5432`.
9. Click __Add__.
10. In left panel click __Session__.
11. Set __Host Name (or IP address)__ to `server_ip`.
12. Set __Port__ to `22`.
13. In __Saved Sessions__ field type in configuration name to store settings. For example `RenewalSSH`.
14. Click __Save__.
Alternatively if you don't plan to use PuTTY for anything else:
- Click __Default Settings__.
- Click __Save__.
After configuration is done use __Open__ to start SSH session.
When asked to*"Login as"*, type in your given username, then passphrase.
If you see `-bash` in last line then it works.
If Tunnel is working you can proceed to **[Chakratos Save Manager] Setup**.
<nowiki>**</nowiki>Windows | Linux | MacOS
<nowiki>***</nowiki>NOTE: If you can't use **[PuTTY]***
1. Open Terminal application on your system (refer to *[your platform]*).
2. Connect by typing `ssh -L server_port:localhost:5432 username@server_ip` where username is your account name.
3. If you set passphrase to your key, enter passphrase.
Chakratos Save Manager
1. Download [Chakratos Save Manager](<nowiki>https://github.com/Chakratos/mhf-save-manager/releases</nowiki>) referred to as **CSM**.
2. Browse to **CSM** directory after unpacking.
2. Open `/www/config.sample.php` with editor of choice, like notepad.
3. Change __DBNAME__, __DBUSER__ and __DBPASS__ to match values in <#channel>
4. Save.
5. Rename `config.sample.php` to `config.php`.
6. Go back to main folder and run `phpdesktop-chrome.exe`
7. Optionally create shortcut to it on your desktop.

Revision as of 08:11, 4 September 2024

Preparing SSH key-pair

Windows

Open __Command Line__ by typing `cmd` in menu start or in WIN+R.

Linux

If gui based, open __Terminal__ from __Applications__/__Utilities__ menu or usually CTRL+ALT+T key combination.

Mac

Look for __Terminal__ in __Applications__/__Utilities__ or type `terminal` in Search Spotlight

Generate OpenSSH key

NOTE: Providing your personal info is not mandatory and not advised. Skip through questions with enter leaving them blank.*

1. In terminal window type: `ssh-keygen -b 4096`

2. You will be asked to *"Enter file in which to save the key"*. Press enter for default location. (Advanced Users can customise that to their own ability).

3. If you already have key in given location don't agree to Override (Skip to **[Account Setup and Verification]** section).

4. Set passphrase when asked to, this will encrypt your key and act as a password. (Not mandatory step but highly recommended.

5. On success you will see:

Your identification has been saved in .../.../username/.ssh/id_rsa.

Your public key has been saved in .../.../username/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx username@hostname

The key's randomart image is

Proceed to **[Account Setup and Verification]** section.

NOTE: Private key `id_rsa` is your unique identity, this file should be kept secret and never shared with anyone. Public key from pair is stored in `id_rsa.pub` file. This will be used to setup ssh authentication.*

Notify @🧰 Server Admin in #💠┃community-chat. Provide your `id_rsa.pub` key in **direct message** to admin handling your request.

While account is being set up head to **[PuTTY]** to prepare tunnel.

**[Terminal SSH Session]** will work only when admin is done.

**Convert OpenSSH key to PPK**

1. Download [package](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) for your system and install.

2. Open __puttygen.exe__ from PuTTY installation directory.

3. Click __File__ > __Load private key__.

4. Change type of browsed file in bottom right from __PuTTY Private Key Files (\*.ppk)__ to __All Files (\*.\*)__ and select your **private** `id_rsa` key file.

5. Enter passphrase if asked to. On sucess you will see:

```

Successfully imported foreign key

(OpenSSH SSH-2 private key (old PEM format)).

To use this key with PuTTY, you need to

use the "Save private key" command to

save it in PuTTY's own format.

```

6. Click __Save private key__.

7. Save as .ppk preferably in same directory as your OpenSSH key.

**SSH Tunnel**

1. Open PuTTY.

2. Expand __SSH__ list on left panel.

3. In left panel expand __Connection__ > __SSH__ and click __Auth__.

4. Click __Browse__.

5. Select your converted .ppk private key. If you cant see __Browse__ in __Auth__, expand it and click __Credentials__. Its first field __Browse__.

6. In __SSH__ click __Tunnels__.

7. Set __Source Port__ to `server_port`.

8. Set __Destination__ to `127.0.0.1:5432`.

9. Click __Add__.

10. In left panel click __Session__.

11. Set __Host Name (or IP address)__ to `server_ip`.

12. Set __Port__ to `22`.

13. In __Saved Sessions__ field type in configuration name to store settings. For example `RenewalSSH`.

14. Click __Save__.

Alternatively if you don't plan to use PuTTY for anything else:

- Click __Default Settings__.

- Click __Save__.

After configuration is done use __Open__ to start SSH session.

When asked to*"Login as"*, type in your given username, then passphrase.

If you see `-bash` in last line then it works.

If Tunnel is working you can proceed to **[Chakratos Save Manager] Setup**.

**Windows | Linux | MacOS

***NOTE: If you can't use **[PuTTY]***

1. Open Terminal application on your system (refer to *[your platform]*).

2. Connect by typing `ssh -L server_port:localhost:5432 username@server_ip` where username is your account name.

3. If you set passphrase to your key, enter passphrase.

Chakratos Save Manager

1. Download [Chakratos Save Manager](https://github.com/Chakratos/mhf-save-manager/releases) referred to as **CSM**.

2. Browse to **CSM** directory after unpacking.

2. Open `/www/config.sample.php` with editor of choice, like notepad.

3. Change __DBNAME__, __DBUSER__ and __DBPASS__ to match values in <#channel>

4. Save.

5. Rename `config.sample.php` to `config.php`.

6. Go back to main folder and run `phpdesktop-chrome.exe`

7. Optionally create shortcut to it on your desktop.