Ich kann meinen Spielerechner anschalten.
Also, ohne hin zu gehen:
$ cat bin/wake-steamund dann geht er an, loggt sich ein, startet Steam und ich kann mich von einem richtigen Computer an das Steam verbinden.
Ich will den Spielerechner abschalten.
Ich könnte warten. Nach 30 Minuten Idle geht er aus.
Aber das sind 30 Minuten 80 Watt für nix.
Man kann einem Windows auf der Kommandozeile sagen, daß es rituellen Selbstmord begehen soll.
C:\Users\Admin> shutdown /s /f /t 0"Ich kann also OpenSSH auf dem Windows installieren, mich remote auf der Kiste anmelden und das Kommando ausführen.
Oder gleich ganz remote:
$ ssh Admin@rtx.local "shutdown /s /f /t 0"Das Paßwort stört.
Macht ja nix, ich kann ja meinen Key installieren.
Für Standard-User:
The contents of your public key (\.ssh\id_ecdsa.pub) needs to be placed on the server into a text file called authorized_keys in C:\Users\username\.ssh\.
Aber: Das funktioniert nicht, wenn der User Mitglied in der Administrators Group ist.
The contents of your public key (\.ssh\id_ecdsa.pub) needs to be placed on the server into a text file called administrators_authorized_keys in C:\ProgramData\ssh\.
Beachte, dass das nicht per User ist, sondern Shared für alle User, die in Administrators sind.
Nun gut, ist ja eine Personal Workstation, gibt also nur einen User und der ist immer Administrator, also muß das immer nach da und nie nach %HOME%\.ssh.
# Get the public key file generated previously on your clientUnd dann, damit alles, alles, alles zerbricht:
For non-English localized versions of the operating system, the script will need to be modified to reflect group names accordingly.
Mein Windows ist English, also geht es, aber die armen Würste, die Windows scripten mussen.
Aber nein:
To prevent errors when granting permissions to group names, the Security Identifier (SID) can be used in its place. The SID can be retrieved by running Get-LocalGroup | Select-Object Name, SID. When using the SID in place of the group name, it must be preceded by an asterisk (*).
In the following example, the Administrators group uses the SID S-1-5-32-544:
$remotePowershell = "powershell Add-Content -Force -Path $env:ProgramData\ssh\administrators_authorized_keys -Value '''$authorizedKey''';icacls.exe ""$env:ProgramData\ssh\administrators_authorized_keys"" /inheritance:r /grant ""*S-1-5-32-544:F"" /grant ""SYSTEM:F"""Und bei Microsoft wundern sich hochbezahlte Marketingmenschen wieso Linux die Welt erobert hat.
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.