Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. [gelöst] SSH Problem: sudo: no tty present and no askpas....

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [gelöst] SSH Problem: sudo: no tty present and no askpas....

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

      @pedder007 sagte in [gelöst] SSH Problem: sudo: no tty present and no askpas....:

      Und am Ende macht der Ton die Musik

      Wenn der erste Gesang überhört wird muss man den Ton lauter drehen.

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

        Hallo @oliverio und sorry das ich doch nochmal auf den Fred hier zurück komme.

        Ich habe aktuelle meinen Proxmox Motioneye doch nochmals neu aufgesetzt, weil ich Schussel ein Buster Image für den Container genutzt hatte. Da mir das upgrade nach bullseye Motioneye zerschießt, also nochmals alles ganz von vorne.

        Ich bilde mir nun ein das ich bzgl. ssh alles soweit richtig gemacht habe, Schlüssel angelegt, Schlüssel übertragen und ssh login klappt auch ohne Passwort vom iobroker Prompt (auf meinem Master) auf den neuen Motioneye Server (Slave).
        Wenn ich allerdings die Befehlszeile zur Ausführung des Scriptes dahinter setze, sieht das Ganze leider so aus und ausgeführt wird da auch nichts:

        iobroker@raspberrypi:/ $ ssh iouser@192.168.188.190 /etc/motioneye/motionmailoff.sh
        bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8)
        /bin/bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8)
        sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
        sudo: a password is required
        sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
        sudo: a password is required
        sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
        sudo: a password is required
        sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
        sudo: a password is required
        sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
        sudo: a password is required
        sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
        sudo: a password is required
        

        Hättest Du da evtl. nochmal einen Tipp für mich?

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

          @pedder007

          da wird ein passwort gefordert und das wollen wir nicht.
          was ist das ergebnis von schritt 4?
          bitte den eingegebenen befehl + die ergebnisausgabe hier posten

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

            @oliverio, wie gesagt saubere ssh-Login ohne PW-Abfrage:

            iobroker@raspberrypi:/ $ ssh iouser@192.168.188.190
            Linux motioneye 5.15.74-1-pve #1 SMP PVE 5.15.74-1 (Mon, 14 Nov 2022 20:17:15 +0100) 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: Wed Feb 22 20:45:55 2023 from 192.168.188.200
            -bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8)
            
            iouser@motioneye:~$ 
            
            OliverIO 1 Reply Last reply Reply Quote 0
            • OliverIO
              OliverIO @Pedder007 last edited by

              @pedder007

              ok
              hast du da jetzt ein passwort eingegeben oder hat das ohne funktioniert (also im hintergrund mit dem key)?
              und dann gleich mal selber das script mit

              /etc/motioneye/motionmailoff.sh
              

              starten

              das locale problem kannst du hier beheben
              https://www.simplified.guide/raspberrypi-os/fix-cannot-change-locale
              evtl hängt das zusammen

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

                @oliverio Aha!
                Also das Login geht ohne PW, der Key sollte also funktionieren.
                Wenn ich den Befehl dann aber, eingeloggt auf dem Motioneye absetze, dann wird 'iouser' nach seinem [sudo] PW gefragt.
                Damit geht's dann auch!

                iouser@motioneye:~$ /etc/motioneye/motionmailoff.sh
                /bin/bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8)
                [sudo] password for iouser: 
                iouser@motioneye:~$ 
                

                Zu Deinem Link:
                Das geht dann aber dann nur auf meinem Master, weil im Proxmox gibts ja kein 'raspi-config'

                Pedder007 1 Reply Last reply Reply Quote 0
                • Pedder007
                  Pedder007 @Pedder007 last edited by Pedder007

                  @OliverIO eine andere Variante (inkl. 'sudo -S') funktioniert dann auch entsprechend mit zusätzlicher PW-Eingabe, führt dann aber auch das Script aus:

                  iobroker@raspberrypi:/ $ ssh iouser@192.168.188.190 sudo -S /etc/motioneye/motionmailoff.sh
                  bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8)
                  [sudo] password for iouser: xxxxxxxx
                  /bin/bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8)
                  

                  Interessant finde ich dabei, dass das PW dabei sogar leserlich eingegeben wird - ich habe es hier ausge-'x'-t

                  Edit:
                  Ich habe jetzt auch nochmals alle Parameter der 'sshd_config' auf dem bisherigen (Buster) System, wo es ja funktioniert, mit dem neuen (Bullseye) System verglichen. Auch da ist alles identisch.

                  Edit2: Ich mache für heute erstmal Schluss. Würde mich freuen wenn Dir noch etwas einfällt. Schönen Abend noch! 🙂

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

                    @pedder007
                    Dann prüfe mal noch die Rechte und Eigentümer des scripts.
                    Wenn da nach Passwort gefragt wird, dann darf iouser die nicht ausführen.
                    Evtl ist dir ein Fehler bei der sudoer Datei passiert.
                    Die bitte immer nur mit visudo editieren.
                    Bei Fehler kann man sich komplett aussperren

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

                      @oliverio die Rechte auf den Scripten hatte ich gestern auch schon gecheckt, allerdings stehen die dabei auf ALLE dürfen Alles 😉

                      Allerdings war der Hinweis auf die sudoer Datei goldrichtig. Als ich das hier eben lass, viel es mir auch wieder ein, dass ich da ja auch eine Zeile hinzu gefügt hatte:
                      8e71d1a8-7b26-446b-adaf-0e159b85e82b-image.png
                      Damit geht's dann nun tatsächlich ohne PW-Abfrage 👍

                      Dazu aber mal noch ne Frage: Muss ich dass dann immer machen, oder liegt das nur an meinem Konstrukt ssh nicht mit dem user iobroker aufzurufen, sondern mit einem anderen user (wobei der ja auf dem Zielsystem schon der Gruppe sudo angehörte)?

                      PS.
                      Die Zeile oben ist ein Screenshoot, da ich nicht weiß, wie man das M-6 (=copy) im visudo verwendet. Wäre dann noch eine Frage 😉

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

                        @pedder007
                        Du kannst mal in der config zum ssh Dämon schauen ob du Authentifizierung über keys eingeschaltet hast.
                        Eigentlich ist das doppelt gemo

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        636
                        Online

                        31.6k
                        Users

                        79.6k
                        Topics

                        1.3m
                        Posts

                        4
                        55
                        2503
                        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