Remote administration lets one dedicated account, SDRADMIN, sign in to SD over ssh from another computer and manage
SD accounts. It is shut as delivered, and the installer does not ask about it. Opening it is the administrator's
decision, made at this computer, signed in to Windows as SDSYS, with remote.sdsys on.
remote.sdsys on
remote.sdsys off
remote.sdsys ssh {on | off}
remote.sdsys
remote.sdsys off shuts it again at once and logs SDRADMIN out; ssh on and ssh off are the same as on and off.
remote.sdsys with no keyword shows each wall: the account, the sdssh group, the sshd arm, the broker and the state,
and then whether the API door is open (remote.sdsys ssh shows the walls alone).
The API is a separate door. SDSYS itself through the API from another computer is shut as delivered too, and is
opened with remote.sdsys api on, for chosen addresses; it is described on its own page,
Remote Administration through the API. This page is about ssh.
Reaching SDSYS from a listed Windows user's own login on this computer is a third, separate thing, off as delivered, described in Reaching SDSYS from Your Own Login.
An elevated administrator can show or shut the ssh walls from PowerShell:
powershell -ExecutionPolicy Bypass -File "C:\Program Files\SD\remote-admin.ps1" -Status
with -Off in place of -Status. -On is SDSYS's alone: the broker that carries out SDRADMIN's requests is a
scheduled task that runs as SDSYS, and Windows lets only SDSYS set up such a task without SDSYS's password, so run by
anyone else -On refuses and changes nothing. tool.remote shows remote administration as its sixth view.
The account#
The first remote.sdsys on makes SDRADMIN and asks for its Windows password. Choose a long password used nowhere
else. To change it later, run net user SDRADMIN * in an elevated prompt. That Windows password is the only one:
SD does not ask SDRADMIN for a second.
SDRADMIN is never a Windows administrator. It may sign in over ssh only: not at the console, not by Remote Desktop,
not as a scheduled task. It lands in its own SD account, with every gate shut, and cannot logto another account.
An upgrade keeps remote administration as it was; the uninstaller removes the broker and SD's sshd lines, and the
account goes with the question about the Windows accounts SD made.
What SDRADMIN can do#
Once signed in, SDRADMIN can type, with the console's own words:
create.account,delete.account,modify.account,modify.password;remote.sdsys off(orssh off),remote.sdsys ssh,remote.sdsys audit{n},remote.sdsys accounts, andremote.sdsyswith no keyword;remote.sdsys api onaddress ...,remote.sdsys api on any,remote.sdsys api off, andremote.sdsys api(the report): SDSYS's door through the API, described in Remote Administration through the API;remote.ssh on,remote.ssh off, andremote.sshwith no keyword (the report);remote.api on,remote.api local,remote.api off, andremote.apiwith no keyword (the report).
A helper checks every word and runs the command as the administrator would at the console. Every request is in the
audit trail, and in C:\ProgramData\SD\remote-admin\broker.log, which only administrators can read.
From the remote session, remote.api on and remote.api off do not restart SD: the firewall part takes effect at
once, and the listener opens or closes the next time SD starts. To restart now, type the command at the console and
answer y. remote.ssh off from the remote session keeps the session it was typed in, but no other computer can then
sign in over ssh, SDRADMIN included, until remote.ssh on is typed at the console; remote administration itself
stays on.
Security warning: what opening it means#
While remote administration is open, anyone who knows or guesses SDRADMIN's password, and can reach this computer's ssh port, can:
- create SD accounts and set any SD account's password, then sign in as that account and read its data;
- change any account's access, including giving it a shell or
os.execute; - suspend accounts;
- delete any SD account together with all of its data; only your backups can bring it back;
- read the audit trail and the list of accounts;
- open or shut ssh access and API access to this computer (
remote.ssh,remote.api); - open SDSYS's door through the API for any addresses (
remote.sdsys api on), after which anyone at those addresses who knows SDSYS's SD password is the administrator; or shut it; - shut remote administration.
They cannot:
- become a Windows administrator or run commands as one;
- touch the SDSYS account, SD's system files or any account SD did not make;
- sign in at the console or by Remote Desktop;
- run a shell,
scp,sftpor port forwarding; - use an ssh key;
logtoanother account;- open remote administration again from a distance.
The password also works for any other Windows network service that accepts every user, exactly as every SD user's password already does. Windows' account-lockout policy is the only limit on guessing. Open it only if you need it, on a network you trust, and shut it when you are done.