Article for advanced users
Information on this page is intended for users with advanced technical knowledge.Treon Gateway - SSH Connection
Sep 6, 2023 · 5 minutes to read
Introduction
If you are trying to do advanced work on the Treon Gateway, Treon Gateway 2 and Treon Gateway in Protective Enclosure that cannot be done via the Configuration UI, you need to connect via an SSH connection. :
The SSH connection will give you access to more advanced functionality such as configuring the IoT gateway application and advanced setting option.
Connect using SSH
For the SSH connection, use any SSH client that is available for your operating system.
For example, Windows 10 has a built-in SSH client, but if you use previous versions of Windows you may need to install an SSH client such as PuTTY.
You can connect either via the Treon Gateway’s Access Point Mode or by connecting the Treon Gateway to your local network via an Ethernet cable.
Connect Using the Treon Gateway’s WLAN Access Point Mode
Connect to the Treon Gateway via Access Point Mode.
Once connected to the access point, open your command prompt, and login.
For example, in Windows 10:
ssh -4 gwadmin@treongw1-<serialnumber>.local
orssh -4 gwuser@treongw1-<serialnumber>.local
Above, serialnumber
is the serial number of your Treon Gateway.
- When prompted, enter your password. You are now logged in.
After you are done with your changes to the Treon Gateway, press the configuration button again to deactivate the Access Point Mode.
Connect using an Ethernet cable
You can also access the Treon Gateway by connecting to your network via an Ethernet cable.
Please Note: It is not possible to connect the Treon Gateway directly to a computer via Ethernet cable.
Attach the Ethernet cable to the Treon Gateway. The gateway is dynamically assigned an IP address and it starts to broadcast its host name using mDNS. Do not connect the gateway directly to a PC, connect it to the same router/modem your PC is connected to.
Open your command prompt.
Find the correct gateway from the network.
After you have found the correct gateway, log in.
For example, via Windows 10:
ssh -4 gwadmin@treongw1-serialnumber.local
orssh -4 gwuser@treongw1-serialnumber.local
Above, serialnumber
is the serial number of your gateway.
- When prompted, enter your password. You are now logged in.
Finding the Correct Treon Gateway
In the rare case that the above does not work, you have to obtain the Treon Gateway’s IP address. When using a computer, you will need an utility program to listen to the mDNS broadcasts on a network. In Windows 10 & Windows 11 you can use dns-sd
from Apple print services (Bonjour).
When you use a computer to connect, you will need a utility program to listen to the mDNS broadcasts on a network:
Linux: avahi-browse
Windows: dns-sd from Apple print services (Bonjour)
Mac: dns-sd -B
For example, in Windows 10 after you have installed Apple print services.
dns-sd -B _ssh._tcp
This command lists all available devices that support SSH in this network. Look for the correct device from the list. Use Ctrl + C to return if needed.
dns-sd -G4 v4 treongw1-<serialnumber>.local
Replace the serialnumber
with your Treon Gateway’s serial number. This command returns the gateway’s IP address. Use Ctrl + C buttons to return if needed.
Type in
ssh gwadmin@ip
and replace ‘ip’ with your Treon Gateway’s IP address obtained above.
If the connection works, the system will ask for a password. Type in the provided gwadmin password.
Type
sudo -i
on the command prompt to gain root privileges. Then you will be able to modify configuration files.
Please Note: Only use the root privileges when necessary and do not modify or delete any configuration files except when following safe procedures described in the Treon Knowledgebase!
You are now successfully logged in using SSH. You can log out with the command exit
.
If your computer is connected over WLAN to an infrastructure network, the configuration of the corporate network routers may prevent mDNS from working. This may prevent you from finding the gateway, even though the gateway itself would be connected to the network with an Ethernet cable. In these cases, connect both your computer and the gateway to the network using an Ethernet cable.
Via IP Address
SSH Tips and Tricks
To simplify your connection process, for example in cases where you manage multiple Treon Gateways, you can create an RSA key pair. This way you don’t have to enter your password every time you log in to a gateway. Copy the public key to all gateways, and keep the private key on your computer. Remember to keep the private key secure at all times!
If you already have an existing key pair, you can use those as well. If you don’t want to use the existing key pair, create a new pair, but remember to back up the existing one.
For further details, see for example, https://www.ssh.com/ssh/keygen/.
Treon Support
You still have questions? Our dedicated team of experts is happy to help you! Please contact Treon Support directly by e-mail.
Did you know? Treon offers Premium Support and Maintenance Packages for our customers. Get even more out of Treon and boost your sales - inquire now about features and prices!