I’m trying to make a connection with a SSH and execute a command all by powershell.
To make the connection I use : T:path to putty.exe -pw password username@ip adres of server
This works fine and give me a connection and opens putty for me, but if i want to execute a command with it (example “df” I receive an error message “Unable to open connection to “IP adres” Network error: Cannot assign requested address. So i googled for a solution, but it seems that i use a correct way for the command. One solution could be using “plink.exe” but i’m not allowed to download something to that server, also there is no internet connection on it.
Does someone know a way to execute the command without these options?
Code can be found here https://pastebin.com/sdAZZqNF
Thanks in advance