Announcing the winners & finalists of the Dataiku Frontrunner Awards 2021! Read their inspiring stories

Run .exe executable file from Dataiku DSS on Remote Windows Server through SSH connection

laurelix
Level 1
Level 1
Run .exe executable file from Dataiku DSS on Remote Windows Server through SSH connection

Hello, 

Is it possible to run .exe file on remote windows server when an activity is triggered in dataiku.
I was thinking using SSH connection.

On theory, SSh enable user to run exe from Linux to Windows with this command

ssh user@hostwindows calc.exe : this command from linux can run calculator on remote windows server.

I was thinking I will wrap that ssh command over python and run with scenarios within dataiku.
I only try using ! on jupyter notebook to process this

!ssh user@hostwindows calc.exe

but i don't know how to input the password. i also tried subprocess.

My question is 

1. how to run command from dataiku like ssh user@hostwindows calc.exe

2. is there any way I can run exe from dataiku dss?

Thank you, your help will be much appreciated

 

 

0 Kudos
2 Replies
AlexT
Dataiker
Dataiker

Hi,

You may want o look at https://pypi.org/project/WMI/  or https://pypi.org/project/pywinrm/

Add one of those libraries to the code environment and execute a recipe based on those.

If you do want to use SSH you can as long as the Windows Server is running SSH. It's best to avoid having to enter passwords in scripts.  Instead, create an SSH key on the DSS server and add the public key to authorized_keys on the Windows server.

Then you can issue the ssh command using subprocess, os command using ssh -i /path/.ssh/key_name username@host  to initiate the password-less connection.

https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement#standar... 

 

 

0 Kudos
laurelix
Level 1
Level 1
Author

Thank you! yes i will try that out, i was thinking about that too. But, I don't have the access to the dataiku dss root folder where dataiku is installed, it's managed by our clients IT team.

I might have to ask for that permission. 
Thank you!

0 Kudos
A banner prompting to get Dataiku DSS