FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: aHome77 am 24 Dezember 2021, 09:39:46

Titel: FHEM Connector für Amazon Alexa - alexaFHEM.ProxyConnection
Beitrag von: aHome77 am 24 Dezember 2021, 09:39:46
Hallo Zusammen,

ich bin nach der Anleitung https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa (https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa)  vorgegangen, insbesondere auch der Punkt "Permission denied",
wie hier beschrieben https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa#Permission_denied (https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa#Permission_denied)

Leider habe ich immer noch den Fehler,
sshautoconf: aborted with user homedir writable by group/other ('chmod 755 /opt/fhem' required)
siehe Log.

[23.12.2021, 21:44:43] *** SSH: checking proxy configuration
[23.12.2021, 21:44:43] sshautoconf: home=/opt/fhem, spath=/opt/fhem/.alexa, cpath=./alexa-fhem.cfg, sshpath=/opt/fhem/.ssh
[23.12.2021, 21:44:43] Passed config: {
  connections: [
    {
      server: '127.0.0.1',
      filter: 'alexaName=..*',
      uid: 999,
      name: 'FHEM',
      port: '8083',
      webname: 'fhem'
    }
  ],
  sshproxy: {
    description: 'FHEM Connector',
    ssh: '/usr/bin/ssh',
    options: [ '-i', '/opt/fhem/.ssh/id_rsa', '-p', 58824, 'fhem-va.fhem.de' ],
    'bind-ip': '127.0.0.1',
    server: Server {
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _connections: 0,
      _handle: [TCP],
      _usingWorkers: false,
      _workers: [],
      _unref: false,
      allowHalfOpen: true,
      pauseOnConnect: false,
      httpAllowHalfOpen: false,
      timeout: 0,
      keepAliveTimeout: 5000,
      maxHeadersCount: null,
      maxRequestsPerSocket: 0,
      headersTimeout: 60000,
      requestTimeout: 0,
      _connectionKey: '4:127.0.0.1:0',
      [Symbol(IncomingMessage)]: [Function: IncomingMessage],
      [Symbol(ServerResponse)]: [Function: ServerResponse],
      [Symbol(kCapture)]: false,
      [Symbol(async_id_symbol)]: 177
    }
  }
}
[23.12.2021, 21:44:43] sshautoconf: *** Error: Your Homedirectory is writable by group/other. This will not work with SSH
[23.12.2021, 21:44:43] sshautoconf: aborted with user homedir writable by group/other ('chmod 755 /opt/fhem' required)
[23.12.2021, 21:44:43] *** SSH: proxy configuration failed: user homedir writable by group/other ('chmod 755 /opt/fhem' required)
[23.12.2021, 21:44:43] No reading "alexaFHEM.bearerToken" found in "alexa" - incoming Cloud requests cannot be validated.
[23.12.2021, 21:44:44] Reading alexaFHEM.ProxyConnection set to error;; user homedir writable by group/other ('chmod 755 /opt/fhem' required)


Die Rechte in /opt/fhem passen, fhem:dialout 755.
Woran kann es noch liegen?
Was mir aufgefallen ist, das der Ordner /opt/fhem/.ssh nicht existierte. Muss ssh anderweitig, also VOR alexa-fhem installiert werden?

Grüße

Andreas

Titel: Antw:FHEM Connector für Amazon Alexa - alexaFHEM.ProxyConnection
Beitrag von: Himi am 24 Dezember 2021, 11:21:39
Hallo,

als mir hat weitergeholfen..

(im Raspi LX Terminal)

Sudo chmod 755 /opt/fhem

gegebenen Falls danach noch folgendes eingeben...

Sudo chmod /opt/fhem/.ssh/id_rsa

im Reading von Alexa  muss dann unter alexaFHEM.ProxyConnecton folgendes stehen... running;SSH connection
Titel: Antw:FHEM Connector für Amazon Alexa - alexaFHEM.ProxyConnection
Beitrag von: aHome77 am 24 Dezember 2021, 11:48:56
Danke für die Info, habe jetzt folgendes eingegeben:


sudo chmod 755 /opt/fhem
sudo chmod 600 /opt/fhem/.ssh/id_rsa

Bin jetzt einen Schritt weiter, mein Fehler war wohl die Berechtigungen mit "sudo chmod fhem:dialout 755 /opt/fhem" anzugeben.

Jetzt kommt noch folgender Fehler:

[24.12.2021, 11:38:23] sshautoconf: SSH key seems to exist
[24.12.2021, 11:38:23] sshautoconf: aborted with Reverse Proxy replied with neither registered nor unregistered status: out:  err:Warning: Permanently added '[fhem-va.fhem.de]:58824,[88.xx.xx.xx]:58824' (RSA) to the list of known hosts.
fhem@fhem-va.fhem.de: Permission denied (keyboard-interactive,publickey).



Titel: Antw:FHEM Connector für Amazon Alexa - alexaFHEM.ProxyConnection
Beitrag von: aHome77 am 24 Dezember 2021, 11:55:46
okay, jetzt funktoniert es  :D

Habe die Files in /opt/fhem/.ssh nochmal gelöscht und "set alexa restart" gestartet.

Danke  :D
Titel: Aw: FHEM Connector für Amazon Alexa - alexaFHEM.ProxyConnection
Beitrag von: Mazz78 am 28 März 2024, 18:22:52
Ich muss/möchte mich hier mal einklinken...

Vorgeschichte:
Meine FHEM-Installation hat aus welchem Grund auch immer den Geist aufgegeben, deswegen habe ich mich entschlossen das letzte Backup wieder einzuspielen.
Soweit funktioniert wieder alles außer...

Problem:
Das Alexa Reading alexaFHEM.ProxyConnection zeigt mir
error; Reverse Proxy replied with neither registered nor unregistered status: out:  err:Unable to negotiate with 2a01:4f8:221:1b5a::f2 port 58824: no matching host key type found. Their offer: ssh-rsa

Was soll mir diese Fehlermeldung sagen ?
Kann damit jemand etwas anfangen und mir sagen was ich machen kann ?  ???

Im Log sehe ich
this is alexa-fhem 0.5.64
...
sshautoconf: SSH key seems to exist
sshautoconf: aborted with Reverse Proxy replied with neither registered nor unregistered status: out:  err:Unable to negotiate with 2a01:4f8:221:xxxx::f2 port 58824: no matching host key type found. Their offer: ssh-rsa

*** SSH: proxy configuration failed: Reverse Proxy replied with neither registered nor unregistered status: out:  err:Unable to negotiate with 2a01:4f8:221:xxxx::f2 port 58824: no matching host key type found. Their offer: ssh-rsa

List Alexa sagt...
Internals:
   FD         4
   FUUID      60291c83-f33f-f943-e160-678b04b844f6cf2b
   FVERSION   39_alexa.pm:0.238200/2021-02-24
   LAST_START 2024-03-28 18:01:41
   NAME       Alexa
   NOTIFYDEV  global,global:npmjs.*alexa-fhem.*
   NR         53
   NTFY_ORDER 50-Alexa
   PARTIAL   
   PID        12215
   STARTS     1
   STATE      running /usr/local/bin/alexa-fhem
   TYPE       alexa
   active     0
   alexa-fhem version 0.5.64
   currentlogfile ./log/alexa-2024.log
   eventCount 2
   logfile    ./log/alexa-%Y.log
   CoProcess:
     cmdFn      alexa_getCMD
     name       alexaFHEM
     state      running /usr/local/bin/alexa-fhem
   READINGS:
     2024-03-28 18:01:41   alexaFHEM       running /usr/local/bin/alexa-fhem
     2024-03-28 18:01:45   alexaFHEM.ProxyConnection error; Reverse Proxy replied with neither registered nor unregistered status: out:  err:Unable to negotiate with 2a01:4f8:221:1b5a::f2 port 58824: no matching host key type found. Their offer: ssh-rsa

     2021-02-14 13:50:54   alexaFHEM.bearerToken crypt:0600..<gekürzt>..c50
     2021-02-14 13:50:54   alexaFHEM.skillRegKey crypt:0406..<gekürzt>..60b
   helper:
Attributes:
   alexaFHEM-config ./alexa-fhem.cfg
   alexaFHEM-log ./log/alexa-%Y.log
   alexaMapping #Characteristic=<name>=<value>,...
On=verb=schalte,valueOn=an;ein,valueOff=aus,valueToggle=um

Brightness=verb=stelle,property=helligkeit,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

Hue=verb=stelle,valuePrefix=auf,values=rot:0;grün:128;blau:200
Hue=verb=färbe,values=rot:0;grün:120;blau:220

Saturation=verb=stelle,property=sättigung,valuePrefix=auf,values=AMAZON.NUMBER
Saturation=verb=sättige,values=AMAZON.NUMBER

TargetPosition=verb=mach,articles=den;die,values=auf:100;zu:0
TargetPosition=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

TargetTemperature=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=grad

Volume:verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

#Weckzeit=verb=stelle,valuePrefix=auf;für,values=AMAZON.TIME,valueSuffix=uhr
   alexaTypes #Type=<alias>[,<alias2>[,...]]
light=licht,lampen
blind=rolladen,rolläden,jalousie,jalousien,rollo,rollos
   devStateIcon stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@green:stop
   echoRooms  #<deviceId>=<room>

   fhemIntents #IntentName=<sample utterance>
gutenMorgen=guten morgen
guteNacht=gute nacht
   group      IO_Devices
   icon       alexa2
   persons    #<personId>=<name>

   room       System
   stateFormat alexaFHEM
Titel: Aw: FHEM Connector für Amazon Alexa - alexaFHEM.ProxyConnection
Beitrag von: Ralli am 28 März 2024, 18:29:49
Eigentlich ganz einfach. Steht doch da, was die Ursache ist:

no matching host key type found

Der einfachste und schnellste Weg dürfte sein, eine Neu-Registrierung am Proxy herbeizuführen wie im Wiki beschrieben.
Titel: Aw: FHEM Connector für Amazon Alexa - alexaFHEM.ProxyConnection
Beitrag von: juemuc am 29 März 2024, 19:10:45
Eventuell muss die ssh_config ergänzt werden.

sudo nano /etc/ssh/ssh_config
Host fhem-va.fhem.de
  HostkeyAlgorithms +ssh-rsa
  PubkeyAcceptedAlgorithms +ssh-rsa

Viele Grüße
Jürgen
Titel: Aw: FHEM Connector für Amazon Alexa - alexaFHEM.ProxyConnection
Beitrag von: Mazz78 am 09 April 2024, 17:53:45
Das hab ich in diesem Beitrag (https://forum.fhem.de/index.php?topic=126292.0) auch schon gesehen, hat allerdings nicht zum Erfolg geführt

ZitatEventuell muss die ssh_config ergänzt werden.

CodeAuswählen
sudo nano /etc/ssh/ssh_config
Host fhem-va.fhem.de
  HostkeyAlgorithms +ssh-rsa
  PubkeyAcceptedAlgorithms +ssh-rsa


ZitatDer einfachste und schnellste Weg dürfte sein, eine Neu-Registrierung am Proxy herbeizuführen wie im Wiki beschrieben.
...leider war es dann auch so.
Jetzt funktionierts wieder