This is an old revision of the document!
Přístup přes SSH
Všechny jednotky Unipi obsahují plně vybavené Linuxové prostředí na bázi ARM, ke kterému lze po provedení níže uvedených instrukcí přistupovat pomocí konzole Secure Shell. To umožňuje uživatelům Unipi plně využít obrovský potenciál otevřených softwarových balíků.
Proces povolení SSH se mezi jednotlivými řadami jednotek Unipi mírně liší. Pro jednotky Axon je postup uveden níže. U jednotek Unipi Neuron a Unipi 1.1 pak postupujte dle návodu pro počítače Raspberry Pi.
Unipi Axon
Kontroléry Axon disponují interním SSH serverem, který je ve výchozím stavu deaktivován a před jeho použitím je třeba jej spustit - instrukce k tomuto kroku naleznete v letáku dodávaném společně s jednotkou. Po povolení serveru je pak možné se k PLC připojit skrze jakéhokoliv SSH klienta v místní síti. Následující tutoriál je určen zejména pro uživatele, kteří nejsou s SSH obeznámeni, a nepředstavuje jediný možný způsob připojení.
Připojení k servisnímu rozhraní a povolení SSH
Prvním krokem je povolit vzdálený přístup k internímu SSH serveru. Toto nastavení je dostupné v servisním rozhraní Axonu, do kterého se dostanete následujícími způsoby:
1) In a local network (with DHCP):
- Connect the unit to your local network, plug in the power supply and wait at least for a minute before the unit boots and gets an IP address from DHCP. After that unplug the power supply
- Press and hold the Service button located (with exceptions) in the upper row of the connector labels to the left from USB port labels
- Plug in the power supply. After few moments the unit will switch to the service mode indicated by the slow flashing of all diodes in section 1 (except PWR and RUN)
- Now you can release the Service button.
- You now need to get the unit's IP address. You can obtain it either from the DHCP server or using a suitable application such as Advanced IP Scanner → user manual
2) Direct connection to the unit (without DHCP):
- Connect to the unit using a network cable (RJ45)
- Press and hold the Service button located (with exceptions) in the upper row of the connector labels to the left from USB port labels
- Plug in the power supply. After few moments the unit will switch to the service mode indicated by the slow flashing of all diodes in section 1 (except PWR and RUN)
- Now you can release the Service button.
- Set the PC's IP address to
192.168.200.100
, mask255.255.255.0
- The Axon's IP is now set to
192.168.200.200
3) Via a Wi-Fi hotspot
- Press and hold the Service button located (with exceptions) in the upper row of the connector labels to the left from USB port labels
- Plug in the power supply. After few moments the unit will switch to the service mode indicated by the slow flashing of all diodes in section 1 (except PWR and RUN)
- Now you can release the Service button.
- Connect to Wi-Fi network with SSID:
UNIPICONFIG
, usingunipi.technology
as password. Wait until your unit obtains an IP address from the DHCP server running in the unit - The Axon's IP is now set to
192.168.201.1
Vložte IP adresu do adresního řádku vašeho prohlížeče a potvrďte. Po spuštění servisního rozhraní by Vás měla uvítat obrazovka s několika tlačítky. Pro povolení SSH serveru nejprve klikněte na Enable ssh uprostřed obrazovky a poté na Restart System v pravém horním rohu.
Unipi Neuron / 1.1
U všech nejaktuálnějších obrazů OS, které pro naše jednotky poskytujeme je SSH ve výchozím stavu povoleno. Vyjímkou je však Mervis OS image, který má SSH vypnuto. Pro jeho aktivaci vytvořte soubor ssh (bez přípony, popř. *.txt) a tento prázdný soubor vložte do bootovacího oddílu SD karty s nachystaným Mervis OS.
Zvolení SW pro připojení
Existuje široká škála nástrojů, pomocí kterých se lze k SSH serverům připojovat. Pro účely tohoto tutoriálu doporučujeme použít PuTTY.
Connect via SSH using PuTTY
For using SSH you need to know the target controller's IP address. To detect the address you can follow this guide: Detecting the unit's IP address.
To connect to the controller we will use the PuTTY. You can use other SSH applications as well, but PuTTY is the most suitable for Windows OS. The program can be downloaded in the Useful tools.
You must enable SSH before connecting to the controller.
Upon finishing the configuration you need to disable the SSH access or change the user password!
Install the downloaded PuTTY following the installer's instructions. After that, launch the program through putty.exe (its default location is C:/Program Files/PuTTY
).
After launch, the following window will appear:
Enter the IP address into the Host Name tab and check if the Connection type is set to the controller's SSH. Then click on Open. A security dialogue window will appear for the first time. Click on “Yes” to display the SSH terminal's command line.
A prompt to enter login and password will be displayed
The default login and password is:
- Login: unipi
- Password: unipi.technology
Login has a time limit. If the limit expires, login will be no longer possible and you need to restart PuTTY and log in again.
The password is entered as an invisible text, eg. if the cursor does not move when entering the password, it is not an error!
After a successful login to a Unipi PLC this screen will appear: