Skip to content
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Logo
  1. ioBroker Community Home
  2. Deutsch
  3. Off Topic
  4. [gelöst] SSH Problem: sudo: no tty present and no askpas....

NEWS

  • Wartung am 15.11. – Forum ab 22:00 Uhr nicht erreichbar
    BluefoxB
    Bluefox
    11
    2
    208

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    7.9k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.7k

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

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

Scheduled Pinned Locked Moved Off Topic
55 Posts 4 Posters 4.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OliverIOO OliverIO

    @pedder007 sagte in SSH Problem: sudo: no tty present and no askpas....:

    Nur eine Anmerkung am Rande, da ich ja Proxmox Newbee bin:
    Es ist schon richtig, dass ich die ganze Zeit immer auf die IP Adresse des Containers Ziele, ja?

    welche systeme hast du den als container?
    bei ssh-copy-id gibst du die user und adresse von system b an, so wie oben beschrieben

    Pedder007P Offline
    Pedder007P Offline
    Pedder007
    wrote on last edited by Pedder007
    #44

    @oliverio UNBELIEVABLE 👍 👍 👍

    Es klappt!

    Ich hab auch das zusätzliche sudo wieder rausgenommen und es funzt!
    64095a47-c235-4179-a6fc-d62652b381d0-image.png

    Herzlichen Dank, hätte ich hier nicht schon ein Freitagsabends-Bierchen stehen, hätte ich mir jetzt eins geholt 😆
    Prost 😉

    Pedder
    All @Proxmox/Bookworm auf HP Elitedesk 800 G4; Zigbee: ZigStar (LAN), ~110Devices
    Unifi, Motioneye/3Reolinks, PiHole, Bosch 7800i via BBQKees/EMS-ESP, Fronius/BYD 11kWp via Modbus

    Pedder007P 1 Reply Last reply
    0
    • Pedder007P Pedder007

      @oliverio UNBELIEVABLE 👍 👍 👍

      Es klappt!

      Ich hab auch das zusätzliche sudo wieder rausgenommen und es funzt!
      64095a47-c235-4179-a6fc-d62652b381d0-image.png

      Herzlichen Dank, hätte ich hier nicht schon ein Freitagsabends-Bierchen stehen, hätte ich mir jetzt eins geholt 😆
      Prost 😉

      Pedder007P Offline
      Pedder007P Offline
      Pedder007
      wrote on last edited by
      #45

      Nachdem die Hürde jetzt genommen ist, kommen als nächstes die Unifi-Konsole und der Pihole in Container.
      Und dann gibts bald schonmal zwei Rapis weniger hier, bei denen die SD-Karten kaputt gehen können....

      Den ioBroker Master behandele ich zunächst mal noch weiter solo, bis die ganze Umzieherei von deConz nach Zigbee fertig ist - nur noch 51 Devices 😉 ... welche alle noch ohne Aliase laufen 😵

      Noch kurz bzgl. der root-Geschichte:
      Mir braucht das wirklich keiner zu predigen, da ich mein gesamtes Berufsleben (>30J) in der IT unterwegs bin, allerdings die letzten ~15 Jahre nur noch rein 'administrativ'. Das ist alles richtig und deshalb gibt's bei mir auch nur so Ausnahmen wie z. B. hier.
      Und am Ende macht der Ton die Musik 😉

      Pedder
      All @Proxmox/Bookworm auf HP Elitedesk 800 G4; Zigbee: ZigStar (LAN), ~110Devices
      Unifi, Motioneye/3Reolinks, PiHole, Bosch 7800i via BBQKees/EMS-ESP, Fronius/BYD 11kWp via Modbus

      Thomas BraunT 1 Reply Last reply
      0
      • Pedder007P Pedder007

        Nachdem die Hürde jetzt genommen ist, kommen als nächstes die Unifi-Konsole und der Pihole in Container.
        Und dann gibts bald schonmal zwei Rapis weniger hier, bei denen die SD-Karten kaputt gehen können....

        Den ioBroker Master behandele ich zunächst mal noch weiter solo, bis die ganze Umzieherei von deConz nach Zigbee fertig ist - nur noch 51 Devices 😉 ... welche alle noch ohne Aliase laufen 😵

        Noch kurz bzgl. der root-Geschichte:
        Mir braucht das wirklich keiner zu predigen, da ich mein gesamtes Berufsleben (>30J) in der IT unterwegs bin, allerdings die letzten ~15 Jahre nur noch rein 'administrativ'. Das ist alles richtig und deshalb gibt's bei mir auch nur so Ausnahmen wie z. B. hier.
        Und am Ende macht der Ton die Musik 😉

        Thomas BraunT Online
        Thomas BraunT Online
        Thomas Braun
        Most Active
        wrote on last edited by
        #46

        @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.

        Linux-Werkzeugkasten:
        https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten
        NodeJS Fixer Skript:
        https://forum.iobroker.net/topic/68035/iob-node-fix-skript
        iob_diag: curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh

        1 Reply Last reply
        0
        • OliverIOO OliverIO

          @pedder007 sagte in SSH Problem: sudo: no tty present and no askpas....:

          Nur eine Anmerkung am Rande, da ich ja Proxmox Newbee bin:
          Es ist schon richtig, dass ich die ganze Zeit immer auf die IP Adresse des Containers Ziele, ja?

          welche systeme hast du den als container?
          bei ssh-copy-id gibst du die user und adresse von system b an, so wie oben beschrieben

          Pedder007P Offline
          Pedder007P Offline
          Pedder007
          wrote on last edited by
          #47

          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?

          Pedder
          All @Proxmox/Bookworm auf HP Elitedesk 800 G4; Zigbee: ZigStar (LAN), ~110Devices
          Unifi, Motioneye/3Reolinks, PiHole, Bosch 7800i via BBQKees/EMS-ESP, Fronius/BYD 11kWp via Modbus

          OliverIOO 1 Reply Last reply
          0
          • Pedder007P Pedder007

            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?

            OliverIOO Offline
            OliverIOO Offline
            OliverIO
            wrote on last edited by
            #48

            @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

            Meine Adapter und Widgets
            TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
            Links im Profil

            Pedder007P 1 Reply Last reply
            0
            • OliverIOO OliverIO

              @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

              Pedder007P Offline
              Pedder007P Offline
              Pedder007
              wrote on last edited by
              #49

              @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:~$ 
              

              Pedder
              All @Proxmox/Bookworm auf HP Elitedesk 800 G4; Zigbee: ZigStar (LAN), ~110Devices
              Unifi, Motioneye/3Reolinks, PiHole, Bosch 7800i via BBQKees/EMS-ESP, Fronius/BYD 11kWp via Modbus

              OliverIOO 1 Reply Last reply
              0
              • Pedder007P Pedder007

                @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:~$ 
                
                OliverIOO Offline
                OliverIOO Offline
                OliverIO
                wrote on last edited by
                #50

                @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

                Meine Adapter und Widgets
                TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                Links im Profil

                Pedder007P 1 Reply Last reply
                0
                • OliverIOO OliverIO

                  @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

                  Pedder007P Offline
                  Pedder007P Offline
                  Pedder007
                  wrote on last edited by Pedder007
                  #51

                  @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'

                  Pedder
                  All @Proxmox/Bookworm auf HP Elitedesk 800 G4; Zigbee: ZigStar (LAN), ~110Devices
                  Unifi, Motioneye/3Reolinks, PiHole, Bosch 7800i via BBQKees/EMS-ESP, Fronius/BYD 11kWp via Modbus

                  Pedder007P 1 Reply Last reply
                  0
                  • Pedder007P 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'

                    Pedder007P Offline
                    Pedder007P Offline
                    Pedder007
                    wrote on last edited by Pedder007
                    #52

                    @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! 🙂

                    Pedder
                    All @Proxmox/Bookworm auf HP Elitedesk 800 G4; Zigbee: ZigStar (LAN), ~110Devices
                    Unifi, Motioneye/3Reolinks, PiHole, Bosch 7800i via BBQKees/EMS-ESP, Fronius/BYD 11kWp via Modbus

                    OliverIOO 1 Reply Last reply
                    0
                    • Pedder007P 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! 🙂

                      OliverIOO Offline
                      OliverIOO Offline
                      OliverIO
                      wrote on last edited by OliverIO
                      #53

                      @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

                      Meine Adapter und Widgets
                      TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                      Links im Profil

                      Pedder007P 1 Reply Last reply
                      0
                      • OliverIOO 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

                        Pedder007P Offline
                        Pedder007P Offline
                        Pedder007
                        wrote on last edited by Pedder007
                        #54

                        @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 😉

                        Pedder
                        All @Proxmox/Bookworm auf HP Elitedesk 800 G4; Zigbee: ZigStar (LAN), ~110Devices
                        Unifi, Motioneye/3Reolinks, PiHole, Bosch 7800i via BBQKees/EMS-ESP, Fronius/BYD 11kWp via Modbus

                        1 Reply Last reply
                        0
                        • OliverIOO Offline
                          OliverIOO Offline
                          OliverIO
                          wrote on last edited by
                          #55

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

                          Meine Adapter und Widgets
                          TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                          Links im Profil

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          109

                          Online

                          32.4k

                          Users

                          81.3k

                          Topics

                          1.3m

                          Posts
                          Community
                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                          ioBroker Community 2014-2025
                          logo
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Recent
                          • Tags
                          • Unread 0
                          • Categories
                          • Unreplied
                          • Popular
                          • GitHub
                          • Docu
                          • Hilfe