[gelöst] sysmon keine Werte von Remote System

Begonnen von TWART016, 18 Juni 2017, 13:56:02

Vorheriges Thema - Nächstes Thema

TWART016

Hallo,

ich hatte bereits in dem Thema die Anfrage gestellt.
https://forum.fhem.de/index.php/topic,17201.msg648763.html#msg648763

Ich kann keine Remote Systeme auditieren.

z.B. von einem anderen Ubuntu auf meinem NUC mit ESXi
Internals:
   DEF        ssh:tim@192.168.178.12 1 1 1 10
   HOST       192.168.178.12
   INTERVAL_BASE 60
   INTERVAL_MULTIPLIERS 1 1 1 10
   MODE       ssh
   NAME       sysmon_nextcloud
   NR         565
   PORT       22
   STATE      Initialized
   TYPE       SYSMON
   USER       tim
   Readings:
     2017-06-18 13:34:47   cpu_core_count  1
     2017-06-18 13:34:47   ens32           not available
     2017-06-18 13:34:47   ens32_diff      not available
     2017-06-18 13:34:47   ram             n/a
     2017-06-18 13:30:47   root            Total: 0 MB, Used: 0 MB, 0 %, Available: 0 MB at / (not available)
     2017-06-18 13:34:47   swap            n/a
   Helper:
     sys_cpu0_freq 0
     sys_cpu0_temp 0
     sys_cpu1_freq 0
     sys_cpu1_temp 0
     sys_cpu2_freq 0
     sys_cpu2_temp 0
     sys_cpu3_freq 0
     sys_cpu3_temp 0
     sys_cpu4_freq 0
     sys_cpu4_temp 0
     sys_cpu5_freq 0
     sys_cpu5_temp 0
     sys_cpu6_freq 0
     sys_cpu6_temp 0
     sys_cpu7_freq 0
     sys_cpu7_temp 0
     sys_cpu_freq_rpi_bbb 0
     sys_cpu_temp_bbb 0
     sys_cpu_temp_rpi 0
     sys_fb     0
     sys_power_ac 0
     sys_power_bat 0
     sys_power_usb 0
     u_first_mark 1
     Cur_readings_map:
       cpu0_idle_stat CPU0 min/max/avg (idle)
       cpu1_idle_stat CPU1 min/max/avg (idle)
       cpu2_idle_stat CPU2 min/max/avg (idle)
       cpu3_idle_stat CPU3 min/max/avg (idle)
       cpu4_idle_stat CPU4 min/max/avg (idle)
       cpu5_idle_stat CPU5 min/max/avg (idle)
       cpu6_idle_stat CPU6 min/max/avg (idle)
       cpu7_idle_stat CPU7 min/max/avg (idle)
       cpu_bogomips BogoMIPS
       cpu_core_count Number of CPU cores
       cpu_idle_stat CPU min/max/avg (idle)
       cpu_model_name CPU model name
       date       Date
       ens32      Network adapter ens32
       ens32_diff Network adapter ens32 (diff)
       ens32_ip   Network adapter ens32 (IP)
       ens32_ip6  Network adapter ens32 (IP6)
       ens32_rx   Network adapter ens32 (RX)
       ens32_speed Network adapter ens32 (speed)
       ens32_tx   Network adapter ens32 (TX)
       fhemstarttime Fhem start time
       fhemstarttime_text Fhem start time
       fhemuptime System up time
       fhemuptime_text FHEM up time
       idletime   Idle time
       idletime_text Idle time
       io_sda     TEST
       io_sda_diff TEST
       io_sda_raw TEST
       loadavg    Load average
       loadavg_1  Load average 1
       loadavg_15 Load average 15
       loadavg_5  Load average 5
       ram        RAM
       ram_free   RAM free
       ram_free_percent RAM free %
       ram_total  RAM total
       ram_used   RAM used
       ram_used_stat RAM used stat
       root       Filesystem /
       starttime  System start time
       starttime_text System start time
       stat_cpu   CPU statistics
       stat_cpu0  CPU0 statistics
       stat_cpu0_diff CPU0 statistics (diff)
       stat_cpu0_percent CPU0 statistics (diff, percent)
       stat_cpu0_text CPU0 statistics (text)
       stat_cpu1  CPU1 statistics
       stat_cpu1_diff CPU1 statistics (diff)
       stat_cpu1_percent CPU1 statistics (diff, percent)
       stat_cpu1_text CPU1 statistics (text)
       stat_cpu2  CPU2 statistics
       stat_cpu2_diff CPU2 statistics (diff)
       stat_cpu2_percent CPU2 statistics (diff, percent)
       stat_cpu2_text CPU2 statistics (text)
       stat_cpu3  CPU3 statistics
       stat_cpu3_diff CPU3 statistics (diff)
       stat_cpu3_percent CPU3 statistics (diff, percent)
       stat_cpu3_text CPU3 statistics (text)
       stat_cpu4  CPU4 statistics
       stat_cpu4_diff CPU4 statistics (diff)
       stat_cpu4_percent CPU4 statistics (diff, percent)
       stat_cpu4_text CPU4 statistics (text)
       stat_cpu5  CPU5 statistics
       stat_cpu5_diff CPU5 statistics (diff)
       stat_cpu5_percent CPU5 statistics (diff, percent)
       stat_cpu5_text CPU5 statistics (text)
       stat_cpu6  CPU6 statistics
       stat_cpu6_diff CPU6 statistics (diff)
       stat_cpu6_percent CPU6 statistics (diff, percent)
       stat_cpu6_text CPU6 statistics (text)
       stat_cpu7  CPU7 statistics
       stat_cpu7_diff CPU7 statistics (diff)
       stat_cpu7_percent CPU7 statistics (diff, percent)
       stat_cpu7_text CPU7 statistics (text)
       stat_cpu_diff CPU statistics (diff)
       stat_cpu_idle_percent CPU statistics idle %
       stat_cpu_io_percent CPU statistics io %
       stat_cpu_irq_percent CPU statistics irq %
       stat_cpu_nice_percent CPU statistics nice %
       stat_cpu_percent CPU statistics (diff, percent)
       stat_cpu_sirq_percent CPU statistics sirq %
       stat_cpu_sys_percent CPU statistics sys %
       stat_cpu_text CPU statistics (text)
       stat_cpu_user_percent CPU statistics user %
       swap       swap
       swap_free  swap free
       swap_total swap total
       swap_used  swap used
       swap_used_percent swap used %
       swap_used_stat swap used stat
       uptime     System up time
       uptime_text System up time
Attributes:
   network-interfaces ens32


sshpass funktioniert bereits. Ich habe den Key erstellt. Er wurde auch erfolgreich in den home Ordner des Benutzers auf dem anderen Server kopiert. Der Key steht in der Datei authorized_keys.

Auch der Login mit ssh tim@192.168.178.12 funktioniert (vom FHEM Server).
FHEM läuft bei mir aber unter dem Benutzer fhem. ssh fhem@host auf den anderen Server funktioniert nicht. Muss ich das einrichten? Wenn ja, mit welchem Befehl? Bei define gebe ich den Benutzer mit den korrekten Rechten an.

2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: updateReadings.1060
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: blockingFinish.1041 name|sysmon_nextcloud|ens32_diff|not available|swap|n/a|ens32|not available|cpu_core_count|1|ram|n/a

2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: getNetworkInfo.2686 SYSMON_getNetworkInfo>>>>>>>>>>>>>>>>$VAR1 = undef;
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4212 Result undef
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 /sbin/ifconfig ens32 2>&1'
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute '/sbin/ifconfig ens32 2>&1' by SSH
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: getNetworkInfo.2674 get ens32
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4212 Result undef
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 LANG=en free'
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute 'LANG=en free' by SSH
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4210 Result '0'
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 [ -f /sys/devices/system/cpu/kernel_max ] && echo 1 || echo 0'
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute '[ -f /sys/devices/system/cpu/kernel_max ] && echo 1 || echo 0' by SSH
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4212 Result undef
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 uptime'
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute 'uptime' by SSH
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4210 Result '0'
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 [ -d /proc/ ] && echo 1 || echo 0'
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute '[ -d /proc/ ] && echo 1 || echo 0' by SSH
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: blockingCall.954 sysmon_nextcloud,
2017.06.18 13:41:01 5: SYSMON sysmon_nextcloud: updateReadings.1060
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: updateReadings.1060
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: blockingFinish.1041 name|sysmon_nextcloud|root|Total: 0 MB, Used: 0 MB, 0 %, Available: 0 MB at / (not available)|ens32_diff|not available|ens32|not available|swap|n/a|cpu_core_count|1|ram|n/a
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: getFileSystemInfo.2610 recieved empty line
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: getFileSystemInfo.2590 recieved 1 lines
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4212 Result undef
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 df / -m 2>/dev/null'
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute 'df / -m 2>/dev/null' by SSH
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: getFileSystemInfo.2585 exec df / -m 2>/dev/null
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: getFileSystemInfo.2574 get root:/

2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: getNetworkInfo.2686 SYSMON_getNetworkInfo>>>>>>>>>>>>>>>>$VAR1 = undef;
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4212 Result undef
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 /sbin/ifconfig ens32 2>&1'
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute '/sbin/ifconfig ens32 2>&1' by SSH
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: getNetworkInfo.2674 get ens32
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4212 Result undef
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 LANG=en free'
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute 'LANG=en free' by SSH
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4210 Result '0'
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 [ -f /sys/devices/system/cpu/kernel_max ] && echo 1 || echo 0'
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute '[ -f /sys/devices/system/cpu/kernel_max ] && echo 1 || echo 0' by SSH
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4212 Result undef
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 uptime'
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute 'uptime' by SSH
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4210 Result '0'
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4194 Call: 'ssh tim@192.168.178.12 [ -d /proc/ ] && echo 1 || echo 0'
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Exec_Ssh.4187 Execute '[ -d /proc/ ] && echo 1 || echo 0' by SSH
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: readPassword.3776 Read password from file
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: blockingCall.954 sysmon_nextcloud, 1
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: updateReadings.1060
2017.06.18 13:40:01 5: SYSMON sysmon_nextcloud: Get.666 sysmon_nextcloud update
2017.06.18 13:39:55 5: SYSMON sysmon_nextcloud: Get.666 sysmon_nextcloud ?
2017.06.18 13:39:55 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:39:55 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:39:55 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:39:55 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?
2017.06.18 13:39:55 5: SYSMON sysmon_nextcloud: Set.748 sysmon_nextcloud ?



Gruß
TWART016

Otto123

Hi,

Du musst ssh schon für den User fhem einrichten sonst es zwecklos.
Vielleicht hilft Dir meine Notiz

Ob das dein eigentliches Problem ist weiß ich nicht, aber es klingt so.

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

SabineT

Zitat von: Otto123 am 18 Juni 2017, 15:50:48
Hi,

Du musst ssh schon für den User fhem einrichten sonst es zwecklos.
Vielleicht hilft Dir meine Notiz

Ob das dein eigentliches Problem ist weiß ich nicht, aber es klingt so.

Gruß Otto
Am Remote System muss der User nicht fhem sein. Der Login muss nur vom fhem-User am FHEM-Server aus möglich sein. sshpass muss also am FHEM-Server vom User fhem aus auf den Remote-Server gemacht werden, dort kann aber jeder User genommen werden, der eine Login-Shell definiert hat.

Es muss also der Inhalt von /opt/fhem/.ssh/id_rsa.pub am Remote-Server in der Datei ~/.ssh/authorized_keys (vom Home-Verzeichnis des remote users aus gesehen) vorhanden sein.

Otto123

#3
eventuell habe ich mich unklar ausgedrückt, genau das meinte ich. Also fhem muss ssh ausführen können nicht irgendein User. fhem muss natürlich nicht auf dem Remote System existieren.

Sorry wenn ich für Verwirrung gesorgt habe
Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

TWART016

FHEM läuft unter dem user fhem
fhem     16847  8.0  1.8  97068 37032 ?        S    16:58   0:00 perl fhem.pl fhem.cfg

su fhem funktioniert jedoch nicht. Mein Passwort funktioniert nicht, oder ist das ein anderes?

id_rsa.pub liegt bei mir nicht in /opt. Ich denke das sollte aber egal sein.

Otto123

hast Du meine Beschreibung gelesen?
Hast Du denn ein Passwort für USER fhem gesetzt?
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

TWART016

Hatte ich iwie übersehen, jetzt kommen auch die Werte.

Warum soll man den Wert der passwd wieder zurücksetzen?

Otto123

Ich sag mal so, im Original ist es so und ich bin für mich der Meinung: ich stelle den Ausgangszustand wieder her. Am Ende ist es egal, wenn die interaktive Anmeldung wieder verhindert ist spielt es eh keine Rolle.

Aber vielleicht weiß und sehe ich irgendetwas nicht.  ???

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

en-trust

#8
Habe auch die Notiz mir angesehen.
Habe zunächst auf dem Home PI den Befehl ssh-keygen -t rsa eingegeben.

Generating public/private rsa key pair.
Enter file in which to save the key (/home/pi/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.


... und dann ? Da wird keine PW es remote users abgefragt.

Danach erfolgt...

pi@raspberrypi:~/.ssh $ cat /home/pi/.ssh/*.pub | ssh pi@192.xxx.xxx.xx
Pseudo-terminal will not be allocated because stdin is not a terminal.
The authenticity of host '192.xxx.xxx.xx (192.xxx.xxx.xx)' can't be established.

Wernieman

Anstatt des komische "cat | ssh" (Kann eigentlich so nicht funktionieren), verwende lieber ssh-copy-id

Und übrigen:, Du baust den Key mit dem user pi! Es soll aber doch mit fhem funktionieren? Bitte richtigen user nehmen. Oder eben komplett manuell, dann must DU aber mehr machen, als angegeben.
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

en-trust

So, mit su fhem angemeldet.

fhem@raspberrypi:/home/pi/.ssh$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/opt/fhem/.ssh/id_rsa):
Created directory '/opt/fhem/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /opt/fhem/.ssh/id_rsa.
Your public key has been saved in /opt/fhem/.ssh/id_rsa.pub.


fhem@raspberrypi:/home/pi/.ssh$ ssh-copy-id -i ~/.ssh/id_rsa fhem@192.xxx
The authenticity of host '192.xxx (192.168.178.32)' can't be established.
ECDSA key fingerprint is ...
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
fhem@192.168.178.32's password:


und beim PW sagt er permission denied

Wernieman

1. Wenn Du im richtigen User bist, brauchst Du bei ssh-copy-id nicht dass File angegeben
2. Eigentlich solltest Du den "Pub" Key kopieren ...
3. Bist DU jetzt auf dem Client oder auf dem Server?
4. Kannst Du Dich momentan auf das Ziel per "ssh hem@192.xxx" und Passwort einloggen?
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Otto123

#12
Hallo en-trust,

in #1 gab es einen Link von mir, nach dem gehst Du aber nicht vor? Also was dort steht funktioniert. Das was Du hier machst ist wirr.

Nochmal für Klick- und Lesefaule die Kurzfassung (nicht für Copy&Paste ohne das Teil zwischen den Ohren!)  ;)
sudo cp /etc/passwd /etc/passwd.sav
sudo  sed -i -e 's/fhem:.*/fhem:x:999:20::\/opt\/fhem:\/bin\/bash/' /etc/passwd
sudo passwd fhem             # Passwort vergeben und bestätigen
su fhem                      # Als fhem einloggen, es startet eine neue session!
ssh-keygen -t rsa            # Speichert automatisch in /opt/fhem/
ssh-copy-id -i ~/.ssh/id_rsa <user>@<remote-system> # gleich den angebotenen Test machen
ssh <user>@<remote-system>   # es startet eine neue session!
exit                         # aus der ssh Test session vom Remotehost!
exit                         # aus der Anmeldung von fhem! 
sudo cp /etc/passwd.sav /etc/passwd


Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Wernieman

@Otto:
Da er als FHEM-User ssh-keygen aufrufen konnte, braucht er seine passwd nicht zu editieren ... ;o)
Bin mir nur nicht mehr so sicher, was er eigentlich wo/wo macht .. deshalb meine Fragen 1-4 an Ihn ...
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Otto123

@Werner
Ja ich weiß, ich habe einfach nochmal den kompletten Prozess kopiert. Eigentlich habe ich das ziemlich Anfängerfest beschrieben. Ich habe mich da damals ziemlich rein gebissen um das einfach und verständlich abzuhandeln. Ich bin der absolute Linux Anfänger :)
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz