More actions
mNo edit summary |
m Formatting text. |
||
Line 6: | Line 6: | ||
=== Linux === | === Linux === | ||
If | If GUI based, open <u>Terminal</u> from <u>Applications</u>/<u>Utilities</u> menu or usually CTRL+ALT+T key combination. | ||
=== Mac === | === Mac === | ||
Line 27: | Line 27: | ||
The key's randomart image is</pre> | The key's randomart image is</pre> | ||
Proceed to [ | Proceed to [[Server Editor Account Setup|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.'' | ''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. | Notify @🧰 Server Admin in #💠┃community-chat. Provide your <code>id_rsa.pub</code> key in <b>direct message</b> to admin handling your request. | ||
While account is being set up head to [ | While account is being set up head to [[Server Editor Account Setup#PuTTY Setup|PuTTY]] to prepare tunnel. | ||
== PuTTY Setup == | == PuTTY Setup == | ||
Line 41: | Line 42: | ||
=== Convert OpenSSH key to PPK === | === Convert OpenSSH key to PPK === | ||
# 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: | |||
2. | 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. | |||
# Click <u>Save private key.</u> | |||
# Save as .ppk preferably in same directory as your OpenSSH key. | |||
=== SSH Tunnel === | === SSH Tunnel === | ||
# 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_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_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>. | |||
Alternatively if you don't plan to use PuTTY for anything else: | Alternatively if you don't plan to use PuTTY for anything else: | ||
Line 105: | Line 80: | ||
- Click __Save__. | - Click __Save__. | ||
After configuration is done use __Open__ to start SSH session. | 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 <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]]. | ||
When asked to | |||
If you see | |||
If Tunnel is working you can proceed to | |||
== Terminal SSH == | == Terminal SSH == | ||
''NOTE: If you can't use [PuTTY] | ''NOTE: If you can't use [PuTTY] | ||
1. Open Terminal application on your system (refer to *[your platform]*). | 1. Open Terminal application on your system (refer to *[your platform]*). | ||
Revision as of 11:21, 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.
- In terminal window type:
ssh-keygen -b 4096
- 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 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:
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
**[Terminal SSH Session]** will work only when admin is done.
Convert OpenSSH key to PPK
- Download PuTTY Package for your system and install.
- Open puttygen.exe from PuTTY installation directory.
- Click File > Load private key.
- 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. - 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.
- Click Save private key.
- Save as .ppk preferably in same directory as your OpenSSH key.
SSH Tunnel
- Open PuTTY.
- Expand SSH list on left panel.
- In left panel expand Connection > SSH and click Auth.
- Click Browse.
- Select your converted .ppk private key. If you cant see Browse in Auth, expand it and click Credentials. Its first field Browse.
- In SSH click Tunnels.
- Set Source Port to `server_port`.
- Set Destination to `127.0.0.1:5432`.
- Click Add.
- In left panel click Session.
- Set Host Name (or IP address) to `server_ip`.
- Set Port to
22
. - In Saved Sessions field type in configuration name to store settings. For example
RenewalSSH
. - 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 Chakrator Save Manager Setup.
Terminal SSH
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.