To detect the OS installed on a server, Termius executes a script. It happens when the connection is being established (in the exec channel) and if Termius hasn't already detected the OS. Having identified the OS installed on a server, Termius can display the logo of the OS next to the host name in the interface, instead of a generic icon.
The information about OSes is synchronized across all devices (requires a Pro or Team account).
OS detection can be enabled / disabled in the settings, and is enabled by default. Disabling OS detection will not cause the logos of detected OSes to disappear.
Note: A server may return information about the installed OS during connection process / handshake. Termius will use that information and show the OS logo, even when OS detection is disabled.
OS detection algorithm
Before Termius executes a script to detect OS, it finds out which shell runs on the server, which is done like so:
echo $SHELL
exit;
If the above script doesn't return an error, Termius runs one of the scripts below, depending on the shell being used on the server.
if set name (uname) = "Linux"
cat /etc/*release
else
uname
end
HISTFILE=;
SA_OS_TYPE="Linux"
REAL_OS_NAME=`uname`
if [ "$REAL_OS_NAME" != "$SA_OS_TYPE" ] ;
then
echo `uname`
else
DISTRIB_ID=\"`cat /etc/*release`\"
echo $DISTRIB_ID;
fi;
exit;
If any of the scripts mentioned in this section returned an error, Termius checks whether or not RouterOS is installed on the server:
:put [/system resource get platform]
Turn OS detection on or off
- In Preferences, open the Terminal page.
- Check or uncheck Detect OS.
- Go to Settings.
- Check or uncheck Detect Host Operating System.
- Go to Settings.
- Check or uncheck Detect OS.
Even if I disable the detect OS script (in 7.55.2), it seems that Termius is still trying to run the first part of the script:
This is causing issues with several servers that I connect to. Is there a way to stop this?
Can you add icon for AIX?
The shell to identify the OS is making some server logout due to exit command
Termius detects a server's OS by analyzing the SSH connection and identifying key system fingerprints such as banners, protocols, and system-specific responses during the handshake process. This allows Termius to determine whether the server is running Linux, macOS, Windows, or another operating system, tailoring its interface and features accordingly for optimized management. For more in-depth insights, you can explore detailed explanations in a relevant blog, which can guide users through understanding these detection mechanisms and how Termius enhances server administration across different platforms.