How to telnet in MATLAB using Plink
<p>I am trying to telnet using Plink through MATLAB. I have tried the following commands and failed:</p>

<pre><code>command = 'C:\MyDirectory\plink.exe';
[status,cmdout] = system(command,'-echo')
</code></pre>

<p><code>cmdout</code> returns the options and inputs available to Plink. But when I try the following it doesn't work:</p>

<p><strong>edit</strong>
I get an error when I try to run the following:</p>

<pre><code>command = 'C:\MyDirectory\plink.exe -telnet @thisUser@someIP 22';
[status,cmdout] = system(command,'-echo')
</code></pre>

<p>What's the right way to do this?</p>

<p><strong>edit 2</strong>
Here is the actual command and the result I get back:</p>

<pre><code>&gt;&gt; command = 'C:\Program Files (x86)\PuTTY\plink.exe -telnet @192.168.14.20';
&gt;&gt; [status,cmdout] = system(command,'-echo')
'C:\Program' is not recognized as an internal or external command, 
operable program or batch file. 

status =

     1


cmdout =

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
</code></pre>

<p>A username is not required so I have not put one prior to the '@' symbol. But, as shown, i am still receiving the '... not recognized...' message. Not really sure why.</p>