Академический Документы
Профессиональный Документы
Культура Документы
ACHTUNG
Der SSH-Konfigurationsdienst darf ausschlielich durch qualifiziertes Personal genutzt werden.
Dieses Dokument beschreibt einen mglichen Mechanismus fr die Fern-Konfiguration und das Fern-Update eines
SIMATIC Thin Client mit SSH. Alle aufgefhrten SSH-Befehle sind Linux-Befehle.
Einleitung
Als sicherer Telnet-Ersatz bietet SSH drei wichtige Eigenschaften:
Authentifizierung der Gegenstelle
Verschlsselung der Datenbertragung einschlielich der Anmeldeinformationen
Datenintegritt, d. h. Schutz vor Manipulation der bertragung.
Voraussetzungen
Folgende Voraussetzungen mssen zur Fern-Konfiguration und zum Fern-Update eines Thin Client erfllt sein:
Der Thin Client befindet sich in einem TCP/IP-Netzwerk und ist ber eine IP-Adresse von einem SSH-Client, z. B. Server
oder PC, ansprechbar.
Auf dem Thin Client luft ein SSH-Server, der ber den Standard-Port 22 erreichbar ist.
Standardprogramme, die das SSH-Protokoll untersttzen, sind auf dem Server oder PC installiert, z. B. OpenSSH,
WinSsh oder WinSCP.
In den Beispielen ist die verwendete IP-Adresse "192.168.11.229" durch die IP-Adresse Ihres Thin Client zu ersetzen.
Allgemeine Informationen
Zum automatisierten Konfigurieren von mehreren Thin Clients kann zum Beispiel die Umgebung "cygwin
(www.cygwin.com)" verwendet werden.
Die Beispiele in diesem Dokument gelten fr das Betriebssystem "Linux".
Der Benutzername des Thin Client lautet immer "tc".
ACHTUNG
Erste Anmeldung
Bei der ersten Anmeldung erhalten Sie folgende Meldung:
The authenticity of host <IP-Adresse> cant be establishedAre you sure you want to continue connecting (yes/no)?
Besttigen Sie diese Meldung mit "yes ". Die IP-Adresse wird zur Liste der bekannten Hosts hinzugefgt.
Siemens 2010
A5E02477565-02, 03/2010
Authentifizierung
bersicht Sicherheitsmechanismen
bersicht
SSH bietet drei Sicherheitsmechanismen:
Authentifizierung der Gegenstelle
Verschlsselung der Datenbertragung einschlielich der Anmelde-Informationen
Datenintegritt, d. h. Schutz vor Manipulation der bertragung.
ACHTUNG
SSH-Kennwort
Die Authentifizierung mit SSH-Kennwort wird nicht mehr untersttzt. Verwenden Sie statt dessen eine Schlsseldatei.
Bei der asymmetrischen Verschlsselung wird ein Schlsselpaar erzeugt, das mathematisch durch
Verschlsselungsalgorithmen wie RSA oder DSA voneinander abhngt. Was mit dem einen Schlssel verschlsselt wird,
kann nur durch den anderen Schlssel wieder entschlsselt werden. Dadurch kann einer der beiden Schlssel ffentlich zur
Verfgung gestellt werden, um Sendungen zu verschlsseln. Die Sendungen knnen dann nur mit dem anderen Schlssel,
der privat und unzugnglich ist, entschlsseln werden.
Im Gegenzug kann ein Datenpaket auch mit dem eigenen privaten Schlssel verschlsselt werden. Wenn dieser
verschlsselte Text sich dann mit dem ffentlichen Schlssel wieder entschlsseln lsst, ist sichergestellt, dass das
Datenpaket ausschlielich vom Besitzer des privaten Schlssels kommt (digitale Signatur).
Vorgehensweise
Um den privaten Standard-Schlssel zu installieren, gehen Sie wie folgt vor:
1. Laden Sie die Datei, die Sie vom "Technical Support (http://support.automation.siemens.com)" erhalten haben, auf Ihren
PC herunter.
2. Legen Sie die Datei als "id_rsa" ohne Dateieendung in dem Verzeichnis ab, in dem sich SSH oder Tools zum Erzeugen
eines Schlsselpaars z. B. "ssh-keygen" befinden.
3. Geben Sie in der Kommandozeile bei jedem Befehl den Schalter -i id_rsa an.
Der Inhalt der Datei "id_rsa" wird als privater Schlssel zum Thin Client bertragen. Weitere Informationen entnehmen Sie
der Dokumentation zu den genannten Tools.
Fern-Konfiguration
Konfigurationsdatei einspielen mit SSH-Kennwort
ACHTUNG
SSH-Kennwort
Die Authentifizierung mit SSH-Kennwort wird nicht mehr untersttzt. Verwenden Sie statt dessen eine Schlsseldatei.
Fern-Update
Versionsnummer der aktuellen Firmware ausgeben
Vorgehensweise
1. Um die Versionsnummer der aktuellen Firmware des Thin Client mit Angabe einer privaten Schlsseldatei auszugeben,
geben Sie folgenden Befehl ein:
ssh i id_rsa tc@192.168.11.229 getsys
Die aktuelle Firmwareversion des Thin Client wird ausgegeben.
Beispiel:
v1.4.0
Firmware aktualisieren
Einleitung
Um ein Fern-Update eines Thin Client durchzufhren, laden Sie die Update-Datei mit der neuen der Firmware auf den
Thin Client und starten den Update-Prozess. Dazu geben Sie in der Kommandozeile die private Schlsseldatei an.
ACHTUNG
Die Update-Datei muss auf dem Thin Client in ein Verzeichnis "/update/fw_update" abgelegt werden. Der Name der
Update-Datei ist frei whlbar.
Vorgehensweise
1. bertragen Sie die Update-Datei mit folgendem Befehl auf den Thin Client:
scp i id_rsa FWupdateDateiTC.upd tc@192.168.11.229:/update/fw_update
Ersetzen Sie dabei "FWupdateDateiTC" durch den Namen Ihrer Update-Datei.
2. Stoen Sie den Update-Prozess auf dem Thin Client mit folgendem Befehl an:
ssh i id_rsa tc@192.168.11.229 update
Der Thin Client wird automatisch heruntergefahren und neu gestartet. Die eingespielte Firmware ist gltig.
Siehe auch
Neues Schlsselpaar erzeugen (Seite 3)
Hintergrundbild ersetzen
Einleitung
Sie ersetzen das Hintergrundbild auf einem Thin Client, indem Sie ein neues Hintergrundbild z. B. "myBackgrPic.png" auf
den Thin Client bertragen.
Voraussetzung fr das Bild
Format: png
Dateigre: maximal 1,5 MByte
Auflsung: entsprechend der Auflsung am Thin Client
10"-Display: 640 x 480 Pixel
15"-Display: 1024 x 768 Pixel
Eine hhere Auflsung ist nicht erlaubt.
Farbtiefe: entsprechend der Farbtiefe, die am Thin Client eingestellt ist.
Das Hintergrundbild wird zentriert in Originalgre dargestellt. Hintergrundbilder, die zu gro sind, werden in der linken
oberen Bildschirmecke platziert.
ACHTUNG
Das Hintergrundbild muss auf dem Thin Client in ein Verzeichnis "/backgr/backgroundPic.png" abgelegt werden. Der Name
des Hintergrundbildes ist frei whlbar.
Vorgehensweise
ACHTUNG
Hintergrundbild unwiederruflich gelscht
Das aktuelle Hintergrundbild wird gelscht und kann nicht wiederhergestellt werden. Sie knnen jedoch das SIMATICHintergrundbild von den Service&Support-Seiten downloaden.
1. Um das Hintergrundbild "myBackgrPic.png" auf den Thin Client zu bertragen, geben Sie folgenden Befehl ein:
scp i id_rsa myBackgrPic.png tc@192.168.11.229:/backgr/backgroundPic.png
2. Um das bertragene Hintergrundbild auf dem Thin Client zu aktivieren, geben Sie folgenden Befehl ein:
ssh i id_rsa tc@192.168.11.229 setbackgr
Anhang
Rckgabewerte bei einer Fern-Konfiguration
Rckgaben auf Stdout (Linux) des SSH-Client beim Ausfhren der Fern-Konfiguration ("restore")
Terminal-Ausgabe:
Error 10: Thin Client restore file does not exist!
Please import a correct configuration file.
Error 11: Error on line "xx" of uploaded file!
Please import a correct config file.
OK: Restoring of Thin Client was successful.
The Thin Client is now rebooting!
Hinweis
Wenn in der Konfigurationsdatei fehlerhafte Werte vorhanden sind, werden die entsprechenden Werte in der
Konfigurationsdatei auf dem Thin Client nicht berschrieben, sondern beibehalten. In diesem Falle werden Warnungen
passend zu den entsprechenden Variablen zurckgegeben, die in HTML Tags eingeschlossen sind. Der Restore-Prozess
wird dennoch ausgefhrt.
Beispiel:
Following values are not updated because of errors:
<tr><td height="10" width="64"></td></tr><tr><td width="64"></td><td>Warning: the new value
"192.168." of variable NET_IP_ADDRESS is not valid!</td></tr> <tr><td
width="64"></td><td><b>RESTORE OK!</b></td></tr>
Restore continued.
OK: Restoring of Thin Client was successful.
The Thin Client is now rebooting!
System-Rckgabewerte:
0 = OK
Bei Fehlermeldungen: Fehlernummer
Rckgaben auf Stdout (Linux) des SSH-Client beim Ausfhren der bernahme der ffentlichen Schlsseldatei ("putkey")
Terminal-Ausgabe:
Error 20: the key file does not exist!
Please import a correct public key file.
Error 21: the size of the key file exceeds 1 kByte!
Please import a correct public key file.
Error 22: the key file is empty!
Please import a correct public key file.
OK: the key file on the Thin Client was replaced successfully.
System-Rckgabewerte:
0 = OK
Bei Fehlermeldungen: Fehlernummer
Rckgaben auf Stdout (Linux) des SSH-Client beim Ausfhren der Fern-Konfiguration zum Auslsen eines Neustarts des
Thin Client ("reboot")
Terminal-Ausgabe:
OK: the Thin Client is now rebooting!
System-Rckgabewerte:
0 = OK
Bei Fehlermeldungen: Fehlernummer
Fern-Konfiguration und Fern-Update von Thin Clients
A5E02477565-02, 03/2010
Rckgaben auf Stdout (Linux) des SSH-Client beim Ausfhren der Fern-Konfiguration zum Auslesen der Thin Client
Systemkonfiguration ("getsys")
Terminal-Ausgabe:
Error 30: the system info file on the target does not exist!
System-Rckgabewerte:
0 = OK
Bei Fehlermeldungen: Fehlernummer
Rckgaben auf Stdout (Linux) des SSH-Client beim Ausfhren der Fern-Konfiguration zum Ersetzen des Hintergrundbildes
("setbackgr")
Terminal-Ausgabe:
Error 40: background picture file does not exist!
Please import a correct background picture file.
Error 41: the size of the uploaded file exceeds 1,5 MByte!
Please upload a smaller PNG image file.
Error 42: the uploaded file seems not to be a valid PNG image file!
Please upload a correct PNG image file.
Error 43: the resolution of the uploaded PNG image file exceeds the limits!
Please upload a PNG image file with a lower resolution.
OK: the new background picture was set correctly.
System-Rckgabewerte:
0 = OK
Bei Fehlermeldungen: Fehlernummer
Rckgaben auf Stdout (Linux) des SSH-Client beim Ausfhren der Fern-Konfiguration zum Ausfhren eines FirmwareUpdates ("update") auf dem Thin Client
Terminal-Ausgabe:
Error 50: the Thin Client firmware update file does not exist!
Please import a correct firmware update file.
Error 51: the firmware update of the Thin Client was not successful!
Please use a correct and suitable firmware update file.
Error 52: there is still another application running!
Please close all applications on the Thin Client. Update was not executed.
OK: the firmware update of the Thin Client was successful.
The Thin Client is now rebooting!
System-Rckgabewerte:
0 = OK
Bei Fehlermeldungen: Fehlernummer
Hinweis
Wenn das Update nicht ausgefhrt werden konnte, wird zustzlich zur Fehlernummer eine Logdatei auf der TerminalAusgabe ausgegeben.
Siemens AG
Industry Sector
Postfach 48 48
90026 NRNBERG
Fern-Konfiguration und Fern-Update von Thin Clients
A5E02477565-02, 03/2010
8
SIMATIC HMI
Remote configuration and remote update of Thin Clients
Product Information
NOTICE
The SSH configuration service may be used by qualified personnel only.
The document provides a description of feasible mechanisms for the remote configuration and update of a SIMATIC
Thin Client with SSH. All SSH commands listed are based on Linux.
Introduction
SSH, as secure Telnet replacement, provides three key features:
Authentication of the opposite station
Encryption of the data transfer including the log-on information.
Data integrity, i.e. protection against manipulation of transfer.
Requirements
The following requirements must be met for the remote configuration and update of a Thin Client:
The Thin Client is logged on to a TCP/IP network and can be accessed by means of an IP address from an SSH Client,
such as a server or PC.
An SSH Server is running on the Thin Client and can be reached via standard port 22.
Standard programs which support the SSH protocol are installed on the server or PC, for example, OpenSSH, WinSsh or
WinSCP.
In the examples, the IP address "192.168.11.229" used is replaced by the IP address of your Thin Client.
General information
Several Thin Clients can be configured automatically, for example, using the "cygwin (www.cygwin.com)" environment.
The examples provided in this document apply to the "Linux" operating system.
The user name of the Thin Client is always "tc".
NOTICE
First log-on
The following message appears during the first log-on:
The authenticity of host <IP Address> cant be establishedAre you sure you want to continue connecting (yes/no)?
Confirm this message with "Yes". The IP address is added to the list of known hosts.
Siemens 2010
A5E02477565-02, 03/2010
Authentication
Overview of security mechanisms
Overview
SSH provides three security mechanisms:
Authentication of the opposite station
Encryption of the data transfer including log-on information.
Data integrity, i.e. protection against manipulation of transfer.
NOTICE
SSH password
Authentication with SSH password is no longer supported. Use a key file instead.
With asymmetric encryption, a key pair is generated whose keys depend mathematically on each other through encryption
algorithms such as RSA or DSA. What is encrypted with one key can be decrypted again with the other key. This means one
of the two keys can be made publicly available to encrypt transmissions. The transmissions can then only be decrypted with
the other key, which is private and inaccessible.
In return, a data package can also be encrypted with the own private key. If this encrypted text can then be decrypted with
the public key, it is ascertained that the entire data package comes only from the owner of the private key (digital signature).
Procedure
To install the private standard key, follow these steps:
1. Download the file you have received from "Technical Support (http://support.automation.siemens.com)" to your PC.
2. Store the file as "id_rsa" without file extension in the folder that contains SSH or tools to generate a key pair, for example,
"ssh-keygen".
3. In the command line, enter the switch -i id_rsa for each command.
The content of the file "id_rsa" is transferred as private key to the Thin Client. For further information, refer to the
documentation of those tools.
10
11
Remote configuration
Load configuration file with SSH password
NOTICE
SSH password
Authentication with SSH password is no longer supported. Use a key file instead.
12
Remote update
Output version number of current firmware
Procedure
1. Type in the following command line and define a private key file to output the version number of the current Thin Client
firmware:
ssh i id_rsa tc@192.168.11.229 getsys
The current firmware version of the Thin Client is output.
Example:
v1.4.0
Update firmware
Introduction
To run a remote update of a Thin Client, upload the update file with the new firmware to the Thin Client and then start the
update process. To do this, enter the private key file in the command line.
NOTICE
Save the update file to a folder named "/update/fw_update" on the Thin Client. You can choose any name for the update
file.
Procedure
1. Use the following command to transfer the update file to the Thin Client:
scp i id_rsa FWupdateDateiTC.upd tc@192.168.11.229:/update/fw_update
Replace "FWupdateDateiTC" with the name of your update file.
2. Initiate the update on the Thin Client by entering the following command:
ssh i id_rsa tc@192.168.11.229 update
The Thin Client is automatically shut down and restarted. The installed firmware is now valid.
See also
Generate new key pair (Page 11)
13
Procedure
NOTICE
Delete background image irrevocably
The current background image will be deleted and cannot be restored. You can, however, download the SIMATIC
background image from the Service&Support pages.
1. Transfer the background image to the Thin Client by entering the following command:
scp i id_rsa myBackgrPic.png tc@192.168.11.229:/backgr/backgroundPic.png
2. Activate the background image on the Thin Client by entering the following command:
ssh i id_rsa tc@192.168.11.229 setbackgr
14
Appendix
Return values during remote configuration
Return values to Stdout (Linux) of the SSH Client during remote configuration ("restore")
Terminal output:
Error 10: Thin Client restore file does not exist!
Please import a correct configuration file.
Error 11: Error on line "xx" of uploaded file.
Please import a correct config file.
OK: Restoring of Thin Client was successful.
Thin Client is now rebooting.
Note
If the configuration file includes incorrect values, then these values will not be overwritten but retained in the configuration
file on the Thin Client. In this case, you will receive warnings for the corresponding variables enclosed by HTML tags. The
restore process is still started.
Example:
The following values are not updated because of errors:
<tr><td height="10" width="64"></td></tr><tr><td width="64"></td><td>Warning: the new value
"192.168." of variable NET_IP_ADDRESS is not valid.</td></tr> <tr><td
width="64"></td><td><b>RESTORE OK.</b></td></tr>
Restore continued.
OK: Restoring of Thin Client was successful.
Thin Client is now rebooting.
System return values:
0 = OK
In case of error messages: Error number
Return values to Stdout (Linux) of the SSH Client during activation of the public key file ("putkey")
Terminal output:
Error 20: The key file does not exist.
Please import a correct public key file.
Error 21: The size of the key file exceeds 1 KB.
Please import a correct public key file.
Error 22: The key file is empty.
Please import a correct public key file.
OK: The key file on the Thin Client was replaced successfully.
System return values:
0 = OK
In case of error messages: Error number
Return values to Stdout (Linux) of the SSH Client during remote configuration for triggering a restart of the Thin Client
("reboot")
Terminal output:
OK: The Thin Client is now rebooting.
System return values:
0 = OK
In case of error messages: Error number
15
Return values to Stdout (Linux) of the SSH Client during remote configuration for reading the system configuration of the
Thin Client ("getsys")
Terminal output:
Error 30: the system info file on the target does not exist!
System return values:
0 = OK
In case of error messages: Error number
Return values to Stdout (Linux) of the SSH Client during remote configuration for replacing the background image
("setbackgr")
Terminal output:
Error 40: background image file does not exist!
Please import a correct background image file.
Error 41: The size of the uploaded file exceeds 1.5 MB.
Please upload a smaller PNG image file.
Error 42: The uploaded file seems not to be a valid PNG image file.
Please upload a correct PNG image file.
Error 43: The resolution of the uploaded PNG image file exceeds the limits.
Please upload a PNG image file with a lower resolution.
OK: The new background image was set correctly.
System return values:
0 = OK
In case of error messages: Error number
Return values to Stdout (Linux) of the SSH Client during remote configuration for updating the firmware of the Thin Client
("update")
Terminal output:
Error 50: The Thin Client firmware update file does not exist.
Please import a correct firmware update file.
Error 51: firmware update of the Thin Client failed!
Please use a correct and suitable firmware update file.
Error 52: There is still another application running!
Please close all applications on the Thin Client. Update was not executed.
OK: The firmware update of the Thin Client was successful.
Thin Client is now rebooting.
System return values:
0 = OK
In case of error messages: Error number
Note
In addition to the error number, a log file is output to the terminal if the update failed.
Siemens AG
Industry Sector
Postfach 48 48
90026 NRNBERG
Remote configuration and remote update of Thin Clients
A5E02477565-02, 03/2010
16