Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst] exec-Baustein will nicht ausführen

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst] exec-Baustein will nicht ausführen

    This topic has been deleted. Only users with topic management privileges can see it.
    • Thomas Braun
      Thomas Braun Most Active @Meister Mopper last edited by

      @meister-mopper sagte in exec-Baustein will nicht ausführen:

      Nein, hier besteht dieses Problem bei virtualisierten Maschinen in Proxmox.

      Dann musst du dich zunächst mit den Rechten der einzelnen user auf den jeweiligen Kisten auseinandersetzen.

      1 Reply Last reply Reply Quote 0
      • OliverIO
        OliverIO @Meister Mopper last edited by

        @meister-mopper

        hast du den ein Ergebnis bei der Ausführung von ssh als nutzer iobroker?

        die folgenden befehle auf deiner shell mit deinem hauptbenutzer der reihe nach ausführen (also jede zeile einzeln)

        sudo -u iobroker bash
        ssh thomas@pihole6 sudo systemctl restart pihole-FTL.service
        

        oder

        sudo -u iobroker bash
        ssh thomas@pihole6 systemctl restart pihole-FTL.service
        
        1 Reply Last reply Reply Quote 0
        • Meister Mopper
          Meister Mopper @OliverIO last edited by Meister Mopper

          @oliverio
          @Thomas-Braun

          ssh kann der user iobroker schonmal, dann muss ich nur noch das login mit ssh-key einrichten.

          thomas@iobroker:~$ sudo -u iobroker ssh thomas@pihole6
          The authenticity of host 'pihole6 (192.168.1.21)' can't be established.
          ED25519 key fingerprint is SHA256:n+ueMb2fbs2S6jZFGTbCgMgD2Uj0BFD4AT+TNIoGFbc.
          This key is not known by any other names.
          Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
          Warning: Permanently added 'pihole6' (ED25519) to the list of known hosts.
          thomas@pihole6's password:
          Linux pihole6 6.8.12-12-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-12 (2025-07-14T13:20Z) x86_64
          
          The programs included with the Debian GNU/Linux system are free software;
          the exact distribution terms for each program are described in the
          individual files in /usr/share/doc/*/copyright.
          
          Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
          permitted by applicable law.
          Last login: Tue Jul 22 17:53:16 2025 from 192.168.178.10
          thomas@pihole6:~$
          

          Ich probiere mal ...

          OliverIO 1 Reply Last reply Reply Quote 0
          • OliverIO
            OliverIO @Meister Mopper last edited by

            @meister-mopper
            wenn du als iobroker angemeldet bis
            den keygen durchgeführt hast

            kannst du mit dem befehl
            ssh-copy-id
            sehr einfach den pub key auf deinen entfernten rechner übertragen

            https://wiki.ubuntuusers.de/SSH/#Public-Key-Authentifizierung

            Meister Mopper 1 Reply Last reply Reply Quote 1
            • Meister Mopper
              Meister Mopper @OliverIO last edited by

              @oliverio

              Erste Maßnahme:

              thomas@iobroker:/home/iobroker$ sudo -u iobroker ssh-keygen -t rsa
              Generating public/private rsa key pair.
              Enter file in which to save the key (/home/iobroker/.ssh/id_rsa):
              Enter passphrase (empty for no passphrase):
              Enter same passphrase again:
              Your identification has been saved in /home/iobroker/.ssh/id_rsa
              Your public key has been saved in /home/iobroker/.ssh/id_rsa.pub
              The key fingerprint is:
              SHA256:Wl7sPLw9frJgzqC8L9i6Q1xN/Q8qA49etraNxLrhn1Q iobroker@iobroker
              The key's randomart image is:
              +---[RSA 3072]----+
              |         .       |
              |        . .      |
              |       o   .     |
              |      o ..  o    |
              |   . . +S E. o   |
              |    o .=**.   .  |
              |   . +oo*+B      |
              |    oo+*oO =o .  |
              |    o+BB*.=.+=   |
              +----[SHA256]-----+
              

              Zweite Maßnahme:

              thomas@iobroker:/home/iobroker$ sudo -u iobroker ls -lah .ssh
              insgesamt 24K
              drwx------ 2 iobroker iobroker 4,0K 22. Jul 18:09 .
              drwxr-xr-x 7 iobroker iobroker 4,0K 22. Jul 17:59 ..
              -rw------- 1 iobroker iobroker 2,6K 22. Jul 18:09 id_rsa
              -rw-r--r-- 1 iobroker iobroker  571 22. Jul 18:09 id_rsa.pub
              -rw------- 1 iobroker iobroker  978 22. Jul 17:59 known_hosts
              -rw-r--r-- 1 iobroker iobroker  142 22. Jul 17:59 known_hosts.old
              

              Dritte Maßnahme (eigentlich auch logisch):

              thomas@iobroker:/home/iobroker$ sudo -u iobroker cat ~/.ssh/id_rsa.pub | ssh thomas@pihole6 'cat >> .ssh/authorized_keys
              '
              cat: /home/thomas/.ssh/id_rsa.pub: Keine Berechtigung
              
              Meister Mopper 1 Reply Last reply Reply Quote 0
              • Meister Mopper
                Meister Mopper @Meister Mopper last edited by

                Muss ich jetzt doch auf dem Zielsystem einen user iobroker einrichten?

                OliverIO 1 Reply Last reply Reply Quote 0
                • OliverIO
                  OliverIO @Meister Mopper last edited by

                  @meister-mopper sagte in exec-Baustein will nicht ausführen:

                  Muss ich jetzt doch auf dem Zielsystem einen user iobroker einrichten?

                  nein

                  gibt es das .ssh verzeichnis für den user thomas auf dem entfernten rechner

                  /home/thomas/.ssh/

                  Meister Mopper 1 Reply Last reply Reply Quote 0
                  • Meister Mopper
                    Meister Mopper @OliverIO last edited by

                    @oliverio sagte in exec-Baustein will nicht ausführen:

                    @meister-mopper sagte in exec-Baustein will nicht ausführen:

                    Muss ich jetzt doch auf dem Zielsystem einen user iobroker einrichten?

                    nein

                    gibt es das .ssh verzeichnis für den user thomas auf dem entfernten rechner

                    /home/thomas/.ssh/

                    Ja

                    thomas@pihole6:~$ ls -lah ~/.ssh
                    insgesamt 14K
                    drwxr-xr-x 2 thomas thomas    3 21. Jul 10:54 .
                    drwx------ 5 thomas thomas   14 22. Jul 17:58 ..
                    -rw-r--r-- 1 thomas thomas 1,2K 21. Jul 10:54 authorized_keys
                    
                    
                    OliverIO 1 Reply Last reply Reply Quote 0
                    • OliverIO
                      OliverIO @Meister Mopper last edited by OliverIO

                      @meister-mopper

                      probiere mal diesen befehl

                      cat id_rsa.pub | ssh user@server 'cat>> ~/.ssh/authorized_keys' 
                      
                      

                      hm sieht eigentlich gleich aus. ich dachte die anführungsstriche fehlen
                      probier mal auf dem entfernten system als user thomas sowas

                      touch ~/ssh/test.txt
                      

                      wenn das auch fehlschlägt, hat user thomas auf dem system noch ein berechtigungsproblem für den ordner .ssh oder die datei authoreized keys

                      Meister Mopper 1 Reply Last reply Reply Quote 0
                      • Meister Mopper
                        Meister Mopper @OliverIO last edited by

                        @oliverio sagte in exec-Baustein will nicht ausführen:

                        @meister-mopper

                        probiere mal diesen befehl

                        cat id_rsa.pub | ssh user@server 'cat>> ~/.ssh/authorized_keys' 
                        
                        

                        Wo muss ich da als welcher user stehen?

                        OliverIO 1 Reply Last reply Reply Quote 0
                        • OliverIO
                          OliverIO @Meister Mopper last edited by

                          @meister-mopper

                          wie gesagt du machst das immer integriert
                          ich mach immer vorab so

                          sudo -u iobroker
                          cat ~/.ssh/id_rsa.pub | ssh thomas@pihole6 'cat>> ~/.ssh/authorized_keys'
                          

                          dann steht am prompt auch
                          sowas
                          iobroker@iobroker

                          Meister Mopper 1 Reply Last reply Reply Quote 0
                          • Meister Mopper
                            Meister Mopper @OliverIO last edited by

                            @oliverio sagte in exec-Baustein will nicht ausführen:

                            @meister-mopper

                            wie gesagt du machst das immer integriert
                            ich mach immer vorab so

                            sudo -u iobroker
                            cat ~/.ssh/id_rsa.pub | ssh thomas@pihole6 'cat>> ~/.ssh/authorized_keys'
                            

                            dann steht am prompt auch
                            sowas
                            iobroker@iobroker

                            Hier kommt aber sowas 🤷‍♂️

                            thomas@iobroker:~$ sudo -u iobroker
                            usage: sudo -h | -K | -k | -V
                            usage: sudo -v [-ABkNnS] [-g group] [-h host] [-p prompt] [-u user]
                            usage: sudo -l [-ABkNnS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command [arg ...]]
                            usage: sudo [-ABbEHkNnPS] [-r role] [-t type] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory]
                                        [-T timeout] [-u user] [VAR=value] [-i | -s] [command [arg ...]]
                            usage: sudo -e [-ABkNnS] [-r role] [-t type] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory]
                                        [-T timeout] [-u user] file ...
                            
                            OliverIO 2 Replies Last reply Reply Quote 0
                            • OliverIO
                              OliverIO @Meister Mopper last edited by

                              @meister-mopper sagte in [exec-Baustein will nicht ausführen]
                              sorry da fehlte bash

                              sudo -u iobroker bash
                              cat ~/.ssh/id_rsa.pub | ssh thomas@pihole6 'cat>> ~/.ssh/authorized_keys'
                              
                              Meister Mopper 1 Reply Last reply Reply Quote 0
                              • OliverIO
                                OliverIO @Meister Mopper last edited by

                                @meister-mopper

                                nur mal nebenbei
                                du willst doch den dns des piholes neu starten?

                                warum nutzt du nicht den endpoint
                                /action/restartdns
                                mittels diesem befehl im neuen pihole2 adapter?
                                https://github.com/oweitman/ioBroker.pi-hole2?tab=readme-ov-file#general-sendto-function

                                Meister Mopper 1 Reply Last reply Reply Quote 0
                                • Meister Mopper
                                  Meister Mopper @OliverIO last edited by

                                  @oliverio sagte in exec-Baustein will nicht ausführen:

                                  @meister-mopper

                                  nur mal nebenbei
                                  du willst doch den dns des piholes neu starten?

                                  warum nutzt du nicht den endpoint
                                  /action/restartdns
                                  mittels diesem befehl im neuen pihole2 adapter?
                                  https://github.com/oweitman/ioBroker.pi-hole2?tab=readme-ov-file#general-sendto-function

                                  Bitte eins nach dem anderen, nicht, dass ich mich verzettele.

                                  1 Reply Last reply Reply Quote 0
                                  • Meister Mopper
                                    Meister Mopper @OliverIO last edited by Meister Mopper

                                    @oliverio sagte in exec-Baustein will nicht ausführen:

                                    @meister-mopper sagte in [exec-Baustein will nicht ausführen]
                                    sorry da fehlte bash

                                    sudo -u iobroker bash
                                    cat ~/.ssh/id_rsa.pub | ssh thomas@pihole6 'cat>> ~/.ssh/authorized_keys'
                                    

                                    Das System möchte das Passwort des users iobroker , wie gehe ich vor?

                                    iobroker@iobroker:/home/thomas$ cat ~/.ssh/id_rsa.pub | ssh thomas@pihole6 'cat>> ~/.ssh/authorized_keys'
                                    thomas@pihole6's password:
                                    iobroker@iobroker:/home/thomas$ exit
                                    exit
                                    thomas@iobroker:~$ sudo -u iobroker bash
                                    iobroker@iobroker:/home/thomas$ ssh pihole6
                                    iobroker@pihole6's password:
                                    

                                    EDIT: Habe meine Blödheit selbst gefunden:

                                    iobroker@iobroker:/home/thomas$ ssh thomas@pihole6
                                    Linux pihole6 6.8.12-12-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-12 (2025-07-14T13:20Z) x86_64
                                    
                                    The programs included with the Debian GNU/Linux system are free software;
                                    the exact distribution terms for each program are described in the
                                    individual files in /usr/share/doc/*/copyright.
                                    
                                    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
                                    permitted by applicable law.
                                    Last login: Tue Jul 22 18:42:17 2025 from 192.168.178.10
                                    thomas@pihole6:~$
                                    
                                    OliverIO 2 Replies Last reply Reply Quote 0
                                    • OliverIO
                                      OliverIO @Meister Mopper last edited by

                                      @meister-mopper das ist das passwort deines benutzers
                                      wie sonst auch bei sudo

                                      1 Reply Last reply Reply Quote 0
                                      • OliverIO
                                        OliverIO @Meister Mopper last edited by OliverIO

                                        @meister-mopper sagte in exec-Baustein will nicht ausführen:

                                        iobroker@iobroker:/home/thomas$ ssh pihole6                                                                                                                                                                            iobroker@pihole6's password:
                                        

                                        hier ist noch ein problem
                                        du musst
                                        ssh thomas@pihole6
                                        eingeben. sonst nimmt er den nutzer mit dem du angemeldet bist

                                        deswegen steht im prompt dann auch

                                        iobroker@pihole6's password:

                                        und nicht

                                        thomas@pihole6's password:

                                        Meister Mopper 1 Reply Last reply Reply Quote 0
                                        • Meister Mopper
                                          Meister Mopper @OliverIO last edited by Meister Mopper

                                          @oliverio

                                          Es läuft, habe gerade mit dem blockly den Service neu gestartet 😊

                                          thomas@pihole6:~$ systemctl status pihole-FTL.service
                                          ● pihole-FTL.service - Pi-hole FTL
                                               Loaded: loaded (/etc/systemd/system/pihole-FTL.service; enabled; preset: enabled)
                                               Active: deactivating (stop-sigterm) since Tue 2025-07-22 18:45:45 CEST; 31s ago
                                              Process: 9946 ExecStartPre=/opt/pihole/pihole-FTL-prestart.sh (code=exited, status=0/SUCCESS)
                                             Main PID: 9960 (pihole-FTL)
                                                Tasks: 5 (limit: 38112)
                                               Memory: 32.8M
                                                  CPU: 59min 40.523s
                                               CGroup: /system.slice/pihole-FTL.service
                                                       └─9960 /usr/bin/pihole-FTL -f
                                          
                                          Jul 22 16:57:46 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.762 CEST [9960M] INFO: Compiled for linux/amd64 (compiled>
                                          Jul 22 16:57:46 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.767 CEST [9960M] INFO: Wrote config file:
                                          Jul 22 16:57:46 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.767 CEST [9960M] INFO:  - 155 total entries
                                          Jul 22 16:57:46 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.767 CEST [9960M] INFO:  - 141 entries are default
                                          Jul 22 16:57:46 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.767 CEST [9960M] INFO:  - 14 entries are modified
                                          Jul 22 16:57:46 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.767 CEST [9960M] INFO:  - 0 entries are forced through en>
                                          Jul 22 16:57:46 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.769 CEST [9960M] INFO: Parsed config file /etc/pihole/pih>
                                          Jul 22 16:57:46 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.769 CEST [9960M] INFO: PID file does not exist or not rea>
                                          Jul 22 16:57:48 pihole6 pihole-FTL[9960]: 2025-07-22 16:57:46.769 CEST [9960M] INFO: No other running FTL process found.
                                          Jul 22 18:45:45 pihole6 systemd[1]: Stopping pihole-FTL.service - Pi-hole FTL...
                                          lines 1-21/21 (END)
                                          

                                          Jetzt muss ich das ganze noch in meine Doku einarbeiten und dann schaue ich mir den endpoint an.

                                          Kall, mei Drobbe!

                                          Vielen Dank an @oliverio und @Thomas-Braun => Ihr seid PRIMA!!!

                                          OliverIO 1 Reply Last reply Reply Quote 0
                                          • OliverIO
                                            OliverIO last edited by

                                            du könntest auch mal noch den befehl probieren

                                            sudo -u iobroker bash
                                            ssh-copy-id -i ~/.ssh/id_rsa.pub thomas@pihole6
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            712
                                            Online

                                            31.9k
                                            Users

                                            80.2k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            40
                                            131
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo