0

I'm writing a script to perform some actions (e.g: execute scripts, copy/paste/rename etc) on a remote machine. The remote machine only has RDP, VNC and FTP activated. I can perform all the above mentioned actions manually using a RDP/VNC viewer but I want to automate them. Initially I wrote my script in Python but I can change to Powershell if necessary. SSH would solve all the problems but unfortunately its not available on the remote machine.

I tried to connect through psexec but its been disabled.

Is it possible to control the remote machine through Python/Powershell using RDP/VNC?

1

1 Answer 1

0

Neither RDP or VNC supports this.

The best you can do is to RDP/VNC to the remote machine.
Copy your script over (if file-transer is disabled you can always open Notepad on the remote and copy/paste the script content from your local PC to Notepad on the remote and save it there).
Then run your script remotely.

7
  • I can transfer the scripts through FTP which is enabled. But I want to run the scripts and get results automatically.
    – Farahi
    Commented Nov 24, 2021 at 13:35
  • @Farahi Run them as Scheduled Tasks on the remote system and have them dump the output files in a folder that is shared by the ftp. Retrieve them from the ftp server.
    – Tonny
    Commented Nov 24, 2021 at 14:55
  • Dumping the output in files is a good idea but unfortunately running scripts as scheduled tasks is not sufficient. I need to be able to trigger them manually.
    – Farahi
    Commented Nov 24, 2021 at 15:05
  • @Farahi Then get SSH enabled. If they are unwilling, you can try selling it to them as a security improvement. You don't need the hopelessly unsecure FTP (seriously... FTP sends userids/passwords as plain text over the LAN...) if you have SSH, because you can run the file-transfer over SSH. (And you can tunnel RDP and/or VNC over SSH as well. Even bigger improvement. Only 1 port to expose.)
    – Tonny
    Commented Nov 24, 2021 at 16:38
  • SSH would be amazing but the problem is that there are hundreds of these machines in the wild. For SSH to be enabled, a technician will have to go to every machine and set up everything manually. I don't think there's anyway I could sell this idea to the management.
    – Farahi
    Commented Nov 25, 2021 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .