Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Send "Shutdown" per SSH zu entferntem Rechner

    NEWS

    • Amazon Alexa - ioBroker Skill läuft aus ?

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    Send "Shutdown" per SSH zu entferntem Rechner

    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wizzardking last edited by

      Hallo zusammen

      Könnte mir bitte jemand erklären, wie ich es in einem Script (vorzugsweise Blockly) realisieren kann, dass IOBroker per SSH (Mittels SSH Key) sich mit einem entfernten Rechner verbindet und dort einen Shutdown Befehl sendet?

      lg

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

        Ich hab das so gelöst.

        function shutDownNAS() {
            var SSH = require('simple-ssh');
            var ssh = new SSH({
                host: '10.0.0.xx',
                port: xxxxx,
                user: 'user',
                pass: 'passwaort'
            });
            log('shutDownNAS');
            ssh.exec('echo "user"|sudo -S shutdown -h now').start();   
        }
        
        1 Reply Last reply Reply Quote 0
        • W
          wizzardking last edited by

          Danke. Genau das, was ich gesucht habe.
          Ich teste es Heute Abend mal und schaue, ob das so auch per SSH Key funktioniert.

          1 Reply Last reply Reply Quote 0
          • B
            bishop last edited by

            hab es damals so gemacht wie hier, da ich Probleme hatte mit dem ssh key.

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

            Support us

            ioBroker
            Community Adapters
            Donate

            1.1k
            Online

            32.3k
            Users

            81.1k
            Topics

            1.3m
            Posts

            blockly javascript
            3
            4
            1136
            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