How to use putty and execute some command in linux server

I’m trying to automate a usecase is like -
Using putty to connect some server in background and execute the command and see the output of command in uipath as Graph or some logs