<p>I have to run a local shell script (windows/Linux) on a remote machine.</p>
<p>I have SSH configured on both machine A and B. My script is on machine A which will run some of my code on a remote machine, machine B.</p>
<p>The local and remote computers can be either Windows or Unix based system.</p>
<p>Is there a way to run do this using plink/ssh?</p>

```
```
<hostA_shell_prompt>$ ssh user@hostB "ls -la"
```
```
That will prompt you for password, unless you have copied your hostA user's public key to the authorized_keys file on the home of user .ssh's directory. That will allow for passwordless authentication (if accepted as an auth method on the ssh server's configuration)