Connecting to Remote Windows Desktop - python-3.x

Need help.Wanted to know is there any module in Python which helps to connect to Remote windows and copies some text file, say vb file, and executes it and get the result test file back to source system which may be Unix (mostly) or windows. However, the destination is always remote windows desktop.
Earlier we used Winrm module and ran scripts on remote desktop. However, we got to know that some system does not have Winrm so need to change the tactic, tried searching but could not get any in Python.

You could use module os
and the os.popen() to use NET.exe service command or more advanced scripting tools like https://www.codeproject.com/Articles/9029/Push-and-Run-NET-Code-on-Remote-Machine. At least on windows NT like systems.

Related

How can I jump to function definitions using VS Code in SSH remote development

Okay I am new to Embedded Linux development.
Right now, I am trying to setup the development environment as efficiently as possible.
I have a python code running on a lightweight Linux based device, that is located remotely
So far I was able to setup my VS Code on my Windows system, in such a way that I can edit the files directly on the remote Linux device.
I followed the instructions below
https://code.visualstudio.com/docs/remote/ssh
https://code.visualstudio.com/docs/remote/ssh-tutorial
Now that I am able to edit my files directly, I face only one obstacle.
I find it hard to traverse to a function/method definition.
In my windows system, I could just Ctrl+LeftClick on a method/function, and it would take me there.
But here when I opened VS Code with the terminal running remotely, I have to do a Ctrl+F and search in the VS Code editor, which is like working on a notepad.
Does anyone know how to get around this?
On my main windows system, I am able to jump to method definitions quickly by Ctrl+LefClick-ing them.
Hope the question is clear enough.
Install the Python extension on the remote server and select the Python interpreter on the Linux device in VS code:
Press Ctrl+Shift+P to bring up the command palette and run the command Python: Select Interpreter.

How can I open RDP using Ansible?

I am working on automating the installation of a custom, in-house software using Ansible on a windows host. During the automation process I have found that one of the msi installers is broken and as a result have to be run interactively on the machine.
I want to trigger the process to run interactively on the machine so the installation completes properly.
The challenge is to open a RDP session from Linux to the windows host to enable this to happen. I am using WSL.
I would like to keep the number of additional dependencies to a minimum.

How can I mount an aws linux instance locally?

I work on a windows machine but I ssh into an AWS linux box to do most of my work. I'm trying to figure out a way I can use my local tools (specifically Spyder) to open up files (python files) from the server so I can edit them in the IDE and then run them on the server. (Note: its not just for code, I also want to be able to open csv's I generate, etc...).
Many modern IDE's provide this option through SSH, looking at the documentation for Spyder, it seems to refer to this configuration as a 'remote kernel'.
I do not use Spyder, but I use a similar configuration to do development with Visual Studio Code on my laptop with remote execution over SSH to an EC2 instance. In VS Code it is referred to as Remote SSH, you open a folder on the remote server as your VS Code workspace.

Use Windows IDE to work with remote project on Linux

I have a project kept in Git repository which is compiled on a huge Linux server. Currently, I connect using SSH to the Linux server, modify the files there and then run commands to compile and execute it.
Everything is done in command line which is really painfull and I would like to use an IDE on my Windows machine which can connect to the remote Linux machine using SSH. I just need the IDE for file modification, auto complete and similar stuff, function resolution etc. I don't need to be able to compile or debug through IDE.
Mounting using Samba or Sshfs is out of the question because it is too slow. I need speed. If I click save, it needs to be save. Autocomplete should work like locally, it should work as though the files are on my machine most of the time.
Can somebody recommend an IDE which this qualities and information on how to set it up.
Thanks
The best thing that worked out for me is Unison. You have to have two copies of Unison, one on Windows client and one on remote Linux. You checkout the repository on the remote and then run Unison to synchronize the remote copy to your local. It connects to remote through ssh. Every time file is changed both locally or remotely, the other side gets updated instantly. Works well on slow connections.
You can then use your favorite IDE and work locally. The only quirt is that Unison must be same version and compiled with same Ocaml version (in my case Unison 2.48.4 with OCaml 4.0.4.). I had to compile it manually for Linux and for Windows I downloaded provided binary.

Setting up Rsync to pull from Windows to Linux Box using cwrsync

I have a set of machines, a mixture of Linux and Windows Boxes.
I hav set up rsync to pull from the Linux Machines to a Linux Server box.
I am trying to accomplish the same using cwRsync, to pull to the Linux box from the windows machines. I have downloaded the free version from https://www.itefix.no/i2/content/cwrsync-free-edition and also I have downloaded CopSSH. I have managed to install CopSSH fine and I am able to SSH between the Linux and Windows hosts no problem using keys rather than passwords.
However, for the life of me I can't get this cwRsync working, I've googled the matter to death, and your meant to unzip the directory, configure the environment settings in the batch file then install it. However, there is nothing to install it with! and the reason it isn't working is because it needs to install a windows service for it to run.
Any help would be much appreciated!
As described at itefix web page for the free edition, it allows to initiate rsync from your Windows machine, i.e. client functionality only (push data). Server functionality allowing you to set up an rsync server on Windows to pull data from it is not a part of the free edition.

Resources