Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9111

Running commands remotely through an RDP connection

$
0
0

This question is a follow up of this one. I am trying to run a command through the command line on a remote machine running Windows 7 from a workstation running Debian in an SSH session on that machine. The setup is basically as follows:

debian box 1 === (SSH) ===> debian box 2 === (RDP) ===> Windows 7

I have tried running rdesktop from debian box 2:

rdesktop <Windows 7 box network address> -u username -p password -r disk:local="./TestRDP" -s "cmd.exe /K net use C: \\\\tsclient\local & C:\\test.bat & logoff"

but cmd.exe is not launched on the remote device. I have also tried to open up cmd.exe on its own:

rdesktop <Windows 7 box network address> -u username -p password -s "cmd.exe"

but the terminal is not launched upon login (rdesktop successfully connects through RDP).

I also tried using FreeRDP:

xfreerdp /u:user /p:password /app:"||cmd" /v:<Windows 7 box network address>

but this error was given upon executing cmd.exe:

RAIL exec error: execResult=RAIL_EXEC_E_NOT_IN_ALLOWLIST NtError=0x15

Reading this (dated) blog entry it is recommended that a registry key is added with the path to the binary (%windir%\System32\cmd.exe) but I cannot edit registry values on the remote machine.

This question suggests using windows remote shell and a third party rdp client to run the terminal on the remote windows machine. Are there any linux alternatives (aside from FreeRDP and rdesktop)?


Viewing all articles
Browse latest Browse all 9111

Trending Articles