hiho,
ich wollt mir grade meine nas mit sysmon abfragen.
was ich bekomme ist aber immer nur: "Error: Telnet error while waiting for user or password prompt: pattern match timed-out"
fhem ist n aktuelles system auf nem raspi2 mit funktionsfähigen telnet, das per ssh auf einen banana pro mit openmediavault zugreifen soll (ebenfalls aktuell und telnet/ssh funzt)
ich war auch schon per terminal vom fhem-raspi auf dem banana pro. also auch das ganze erlaubniss-gedöns ist erledigt.
zum banana:================================================================================
= OS/Debian information
================================================================================
Distributor ID: debian
Description: Debian GNU/Linux 7 (wheezy)
Release: 7.11
Codename: wheezy
================================================================================
= openmediavault information
================================================================================
Release: 2.2.13
Codename: Stone burner
================================================================================
= Date
================================================================================
Mon Mar 27 13:29:59 CEST 2017
================================================================================
= Hostname
================================================================================
Luke7
================================================================================
= Locale
================================================================================
de_DE.UTF-8
================================================================================
= System information
================================================================================
Linux Luke7 3.4.104-bananian #1 SMP PREEMPT Mon Apr 6 18:25:40 UTC 2015 armv7l GNU/Linux
ein list des devices:Internals:
CFGFN
DEF ssh:xxxxx@luke7:xx
HOST luke7
INTERVAL_BASE 60
INTERVAL_MULTIPLIERS 1 1 1 10
MODE ssh
NAME Luke7
NR 5276
PORT xx
STATE Error: Telnet error while waiting for user or password prompt: pattern match timed-out
TYPE SYSMON
USER xxxxxx
Readings:
2017-03-27 13:30:37 Luke7 Total: 0 MB, Used: 0 MB, 0 %, Available: 0 MB at /dev/sdb (not available)
2017-03-27 13:30:37 System Total: 0 MB, Used: 0 MB, 0 %, Available: 0 MB at /dev/mmcblk0 (not available)
2017-03-27 13:30:37 Zapfstelle Total: 0 MB, Used: 0 MB, 0 %, Available: 0 MB at /dev/sda (not available)
2017-03-27 13:33:37 cpu_core_count 1
2017-03-27 13:33:37 eth0 not available
2017-03-27 13:33:37 eth0_diff not available
2017-03-27 13:33:37 ram n/a
2017-03-27 13:33:37 swap n/a
2017-03-27 13:33:37 wlan0 not available
2017-03-27 13:33:37 wlan0_diff not available
Helper:
error_msg
net_eth0_stat_class 0
net_wlan0_stat_class 0
proc_fs 0
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_core_num 1
sys_cpu_freq_rpi_bbb 0
sys_cpu_num 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:
Luke7 Filesystem /dev/sdb
Luke7_free Filesystem /dev/sdb (free)
Luke7_used Filesystem /dev/sdb (used)
Luke7_used_percent Filesystem /dev/sdb (used %)
System Filesystem /dev/mmcblk0
System_free Filesystem /dev/mmcblk0 (free)
System_used Filesystem /dev/mmcblk0 (used)
System_used_percent Filesystem /dev/mmcblk0 (used %)
Zapfstelle Filesystem /dev/sda
Zapfstelle_free Filesystem /dev/sda (free)
Zapfstelle_used Filesystem /dev/sda (used)
Zapfstelle_used_percent Filesystem /dev/sda (used %)
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
eth0 Network adapter eth0
eth0_diff Network adapter eth0 (diff)
eth0_ip Network adapter eth0 (IP)
eth0_ip6 Network adapter eth0 (IP6)
eth0_rx Network adapter eth0 (RX)
eth0_speed Network adapter eth0 (speed)
eth0_tx Network adapter eth0 (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
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
wlan0 Network adapter wlan0
wlan0_diff Network adapter wlan0 (diff)
wlan0_ip Network adapter wlan0 (IP)
wlan0_ip6 Network adapter wlan0 (IP6)
wlan0_rx Network adapter wlan0 (RX)
wlan0_speed Network adapter wlan0 (speed)
wlan0_tx Network adapter wlan0 (TX)
Excludes:
Shadow_map:
Luke7 Total: 0 MB, Used: 0 MB, 0 %, Available: 0 MB at /dev/sdb (not available)
System Total: 0 MB, Used: 0 MB, 0 %, Available: 0 MB at /dev/mmcblk0 (not available)
Zapfstelle Total: 0 MB, Used: 0 MB, 0 %, Available: 0 MB at /dev/sda (not available)
cpu_core_count 1
eth0 not available
eth0_diff not available
ram n/a
swap n/a
wlan0 not available
wlan0_diff not available
Attributes:
filesystems System:/dev/mmcblk0,Zapfstelle:/dev/sda,Luke7:/dev/sdb
nonblocking 1
was nun?
das steht im modul dazu bzw. die abfrage für die Fehlermeldung bei dir:
unless ( ($before,$match) = $telnet->waitfor('/(user|login|password): $/i') )
d.h. liefert dein telnet bei der Bananenkiste ;D irgendwas anderes zurück, wenn du dich per telnet mit verbindest? (also nicht "user" oder "login" oder "password"?)
hiho
thx fürs schnelle reagieren.
ich poste mal - das is n 08/15 login über kitty - und ja, ich weiß, root is böse *g*
login as: root
root@luke7's password:
Linux Luke7 3.4.104-bananian #1 SMP PREEMPT Mon Apr 6 18:25:40 UTC 2015 armv7l
------------------------------------------------------------------------
Welcome to Bananian Linux!
For news and updates check: https://www.bananian.org
Any questions? Read the FAQ first: https://www.bananian.org/faq
Run 'bananian-config' to set up Bananian Linux
Run 'bananian-update' to check for distribution updates
------------------------------------------------------------------------
Last login: Tue Mar 28 09:45:38 2017 from dr-evil.fritz.box
root@Luke7:~#
was ich nun machen muß, weiß ich allerdings so gar ned - ich nehm mal an, irgendwas mit regex?
Hi,
ich verstehe zwar die Antwort nicht Telnet ... wenn Du eigentlich ssh machen willst?
Das "Erlaubnisgedöns" hast Du auch mit User gemacht unter dem FHEM läuft, normalerweise fhem?
Gruß Otto
Zitatich verstehe zwar die Antwort nicht Telnet ... wenn Du eigentlich ssh machen willst?
naja, zumindest hät ich bei putty/kitty ssh angehackt (linux is für mich nachwievor nur ne abschreibübung).
und du hast mich wol erwischt - fhem user, das wirds - jetzt muß ich nur mehr rauskriegen, was der user fün n pwd hat *schäm*
Hi,
normalerweise keines. ;) Ich habe das für ssh mal hier (http://heinz-otto.blogspot.de/2017/01/per-ssh-remote-befehle-direkt-ausfuhren.html)beschrieben. Sollte mit absschreiben funktionieren - ich kann es auch nicht besser :)
Man kann was Du jetzt gemacht hast eventuell einfach kopieren, habe ich aber nicht versucht.
Gruß Otto
wart mal .... bevor ich jetzt anfang, pwd's zu vergeben ...
ich muß im sysmon doch für die ssh-session ein user/pwd von der banane verwenden und das hab ich.
den fhem user zu nemhmen, war jetzt wohl eher n mißverständnis.
o.k. langsam kapier ichs.
also doch pwd - werd mir mal deine anleitung ins kiddy kopieren und dich dann schimpfen, wenn ich was falsch gemacht hab *g*
Du bedenkst aber nicht den Austausch der ssh Hostkeys, diese werden im Homedir des Users gespeichert.
Wie gesagt Du vermischst Erlaubnisgedöns mit der Realität der User. Das Erlaubnisgedöns hat nicht nur mit dem User auf der anderen Büchse zu tun sondern auch mit der Büchse selbst.
schau mal bei deinem User in ~/.ssh also ls -l ~/.ssh
Gruß Otto
ich hab jetzt deine anleitung 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
befolgt und jetzt blockiert mir fhem
restart von fhem und das rauslöschen der sysmon-sachen aus der cfg nutzen mal 0 - was nun?
mußte den gesamten raspi neu starten ...
fhem rennt kurz und dann is wieder ende
gut, sobald ich das sysmon-device ganz kille gehts wieder.
o.k. ich verzichte lieber aus das gespiele, bevor ich nochmal 5 jahre meines lebens verliere ...
Hi,
na würde ich denken ssh funktioniert nun und deine Idee mit dem sysmon geht schief?
Zu dem sysmon remote kann ich Dir nicht helfen.
Gruß Otto
weiß nicht, was geht. ich weiß nur, das das anlegen eines stink normalen sysmon mit ssh sofort zum stillstand von fhem führt. so arg, dass er nicht mal noch das device in der cfg speichert.