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)
 
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
Preparing SSH key-pair
== Preparing SSH key-pair ==
<!-- Needs https://www.mediawiki.org/wiki/Extension:Tabs to work -->
<tabs>
<tab name="Windows">Open <u>Command Line</u> by typing <code>cmd</code> in menu start or in WIN+R.</tab>
<tab name="Linux">If GUI based, open <u>Terminal</u> from <u>Applications</u>/<u>Utilities</u> menu or usually CTRL+ALT+T key combination.</tab>
<tab name="Mac">Look for <u>Terminal</u> in <u>Applications</u>/<u>Utilities</u> or type <code>terminal</code> in Search Spotlight.</tab>
</tabs>


Windows
=== Generate OpenSSH key ===


Open __Command Line__ by typing `cmd` in menu start or in WIN+R.
''NOTE: Providing your personal info is not mandatory and not advised. Skip through questions with enter leaving them blank.''


Linux
# In terminal window type: <code>ssh-keygen -b 4096</code>
# 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).
# If you already have key in given location don't agree to Override (Skip to [[Server Editor Account Setup#Account Verification|Account Setup and Verification]] section).
# Set passphrase when asked to, this will encrypt your key and act as a password. (Not mandatory step but highly recommended.
# On success you will see:
<pre>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</pre>
 
Proceed to [[Server Editor Account Setup#Account Verification|Account Setup and Verification]] section.
 
== Account Verification ==
''NOTE: Private key <code>id_rsa</code> is your unique identity, this file should be kept secret and never shared with anyone. Public key from pair is stored in <code>id_rsa.pub</code> file. This will be used to setup ssh authentication.''
 
Notify @🧰 Server Admin in #💠┃community-chat. Provide your <code>id_rsa.pub</code> key in <b>direct message</b> to admin handling your request.


If gui based, open __Terminal__ from __Applications__/__Utilities__ menu or usually CTRL+ALT+T key combination.
While account is being set up head to [[Server Editor Account Setup#PuTTY Setup|PuTTY]] to prepare tunnel.


Mac
== PuTTY Setup ==


Look for __Terminal__ in __Applications__/__Utilities__ or type `terminal` in Search Spotlight
=== Convert OpenSSH key to PPK ===


Generate OpenSSH key
# Download [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY Package] for your system and install.
# Open <u>puttygen.exe</u> from PuTTY installation directory.
# Click <u>File</u> > <u>Load private key.</u>
# Change type of browsed file in bottom right from <u>PuTTY Private Key Files (*.ppk)</u> to <u>All Files (*.*)</u> and select your '''private''' <code>id_rsa</code> key file.
# Enter passphrase if asked to. On sucess you will see:


NOTE: Providing your personal info is not mandatory and not advised. Skip through questions with enter leaving them blank.*
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.


1. In terminal window type: `ssh-keygen -b 4096`
# Click <u>Save private key.</u>
# Save as .ppk preferably in same directory as your OpenSSH key.


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).
=== SSH Tunnel ===


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.
# Open PuTTY.
# Expand <u>SSH</u> list on left panel.
# In left panel expand <u>Connection</u> > <u>SSH</u> and click <u>Auth</u>.
# Click <u>Browse</u>.
# Select your converted .ppk private key. If you cant see <u>Browse</u> in <u>Auth</u>, expand it and click <u>Credentials</u>. Its first field <u>Browse</u>.
# In <u>SSH</u> click <u>Tunnels</u>.
# Set <u>Source Port</u> to [[Server#Server Connection|server port]].
# Set <u>Destination</u> to `127.0.0.1:5432`.
# Click <u>Add</u>.
# In left panel click <u>Session</u>.
# Set <u>Host Name (or IP address)</u> to [[Server#Server Connection|server ip]].
# Set <u>Port</u> to <code>22</code>.
# In <u>Saved Sessions</u> field type in configuration name to store settings. For example <code>RenewalSSH</code>.
# Click <u>Save</u>.


4. Set passphrase when asked to, this will encrypt your key and act as a password. (Not mandatory step but highly recommended.
Alternatively if you don't plan to use PuTTY for anything else:


5. On success you will see:
# Click <u>Default Settings</u>.
# Click <u>Save</u>.


Your identification has been saved in .../.../username/.ssh/id_rsa.
After configuration is done use <u>Open</u> to start SSH session. When asked to ''"Login as"'', type in your given username, then passphrase. If you see <code>-bash</code> in last line then it works. If Tunnel is working you can proceed to [[Server Editor Account Setup#Chakratos Save Manager\|Chakrator Save Manager Setup]].
Your public key has been saved in .../.../username/.ssh/id_rsa.pub.
== Terminal SSH ==
The key fingerprint is:
''NOTE: If you can't use [[Server Editor Account Setup#PuTTY Setup|PuTTY]] or want to use terminal.''
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx username@hostname
 
The key's randomart image is
# Open Terminal application on your system (refer to [[Server Editor Account Setup#Preparing SSH key-pair|your platform]]).
# Connect by typing <code>ssh -L server_port:localhost:5432 username@server_ip</code> where username is your account name.
# If you set passphrase to your key, enter passphrase.


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


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.*
# Download [https://github.com/Chakratos/mhf-save-manager/releases Chakratos Save Manager] referred to as '''CSM'''.
# Browse to '''CSM''' directory after unpacking.
# Open <code>/www/config.sample.php</code> with editor of choice, like notepad.
# Change <u>DBNAME</u>, <u>DBUSER</u> and <u>DBPASS</u> to match values given by admin or editor access #📕┃ editor-guides / # setup.
# Save.
# Rename <code>config.sample.php</code> to <code>config.php</code>.
# Go back to main folder and run <code>phpdesktop-chrome.exe</code>
# Optionally create shortcut to it on your desktop.
[[Category:Server Guides]]

Latest revision as of 21:41, 4 September 2024

Preparing SSH key-pair

Open Command Line by typing cmd in menu start or in WIN+R.
If GUI based, open Terminal from Applications/Utilities menu or usually CTRL+ALT+T key combination.
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.

Account Verification

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.

PuTTY Setup

Convert OpenSSH key to PPK

  1. Download PuTTY Package 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.
  1. Click Save private key.
  2. 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:

  1. Click Default Settings.
  2. 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 Chakrator Save Manager Setup.

Terminal SSH

NOTE: If you can't use PuTTY or want to use terminal.

  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 referred to as CSM.
  2. Browse to CSM directory after unpacking.
  3. Open /www/config.sample.php with editor of choice, like notepad.
  4. Change DBNAME, DBUSER and DBPASS to match values given by admin or editor access #📕┃ editor-guides / # setup.
  5. Save.
  6. Rename config.sample.php to config.php.
  7. Go back to main folder and run phpdesktop-chrome.exe
  8. Optionally create shortcut to it on your desktop.