Overview of methods for connecting to a PBX using SSH
SSH (Secure Shell) is a protocol used for secure remote connections and server management. It allows you to run commands, transfer files, and administer systems through an encrypted channel. SSH protects your data from interception by providing authentication and encryption between the client and the server. It is a primary tool for developers, system administrators, and DevOps engineers when working with remote machines.
SSH connection
Below are three different methods for connecting to MikoPBX via the SSH protocol:
Password-based connection using third-party applications (this article uses PuTTY as an example)
Key-based connection, demonstrated with examples on Windows, Linux (MacOS)
This tutorial will describe how to connect via SSH using Putty
Download the program to connect via SSH. This can be done on the official website at the link
Run the downloaded program. The main menu will open for you.
Go to the "Connection" - "Data" section
"Auto-login username" specify root
"Terminal-tipe string" specify xterm-256color
Go to the "Translation" section
«Remote character set» - specify UTF-8
Set the flag «Enable VT100 line drawing even in UTF-8 mode»
Go to the section "Session" - "Logging". Here you can configure saving the output to a file:
Go to the "Session" section
Required data:
Host Name (or IP address) — IP address of the PBX
Port — port for SSH connection by default 22
Enter the session name and save its settings
In the future, use the "Load" action to use the previously saved session
Perform the "Open" action to connect to the PBX and enter the SSH password
Before connecting, you need to allow password authorization in the MikoPBX web interface, as well as set a password for connection: to do this, go to "General Settings" -> "SSH"
After entering the SSH password, the PBX menu will open
To open the console, go to "[9] Console(Shell)"
SSH Connection (Linux/MacOS Terminal)
Connecting to MikoPBX via SSH using Terminal (Linux/MacOS)
Generating and Linking the Key
First, generate an SSH key. Open a terminal and enter the following command to create it:
In this example, an "ed25519" key will be generated with the comment "[email protected]" for future identification.
You can also specify a path where the key files will be saved. By default, keys are stored in ~/.ssh/id_ed25519.pub. To set a custom path, add -f and specify it, for example:
ssh-keygen -t ed25519 -f ~/.ssh/my_new_key
Creating the SSH Keys (pair)
By default, the key is saved at Username/.ssh/id_ed25519.pub on macOS or /home/Username/.ssh/id_ed25519.pub on Linux.
Next, you need to retrieve and copy the newly created public key. Enter the command:
Open the MikoPBX web interface and go to System → General Settings:
Paste your public key into the "SSH Authorized Keys" field:
To connect via SSH, run the following command in your terminal:
Replace the following with your actual parameters:
The path to your SSH key (if different from default).
The IP address of your MikoPBX in place of mikopbxipadress.
Upon successful authentication, you will be connected to the MikoPBX console via SSH:
SSH Connection (Google Secure Shell)
SSH Connection using Google Secure Shell
This method is available if you use Google Chrome for connection to the MikoPBX web interface.
Enabling password access
Go to the "System" -> "General Settings" section.
"System" - "General settings" section
Go to the "SSH" section. Toggle the "Disable password logins" switch (switch is enabled by default). Set your password for the SSH connection. Save the settings.
Do not use weak passwords! Always disable password-based SSH connections after you log out!
Password-based access
Connection using Google Secure Shell
In the MikoPBX Web-interface, go to "Maintenance" -> "SSH console".
If you don't have the "Secure Shell" browser extension installed, you will be redirected to the extension store. Click "Add to Chrome." After installation is complete, return to the web interface and repeat Step 1.
After redirecting to the Google Secure Shell tab, enter "yes" in the dialog box for a new connection. Press "Enter."
In the new dialog box, enter the previously set SSH password. Press "Enter."
An SSH connection will be established. 🎉
cat ~/.ssh/id_ed25519.pub
ssh -i ~/.ssh/id_ed25519 root@mikopbxipadress
Connecting via SSH
Public key
SSH Authorized Keys Field
Successful connection!
"Maintenance" -> "SSH Console" section
Installing extension
Dialog box #1
Dialog box #2
Successful SSH connection
SSH Connection (Windows Powershell)
Connecting to MikoPBX via SSH using PowerShell (OpenSSH)
Generating and Linking the Key
To begin, you need to install OpenSSH on Windows. You can do this from this link.
After installation, verify it by entering the following command in PowerShell:
ssh -V
You should see the OpenSSH version displayed:
OpenSSH version
If nothing happens when checking the version, you can run: