<div dir="ltr">Hello,<div><br></div><div style>I've installed Paramiko on my PC with Python 2.7.</div><div style><br></div><div style>My code is: </div><div style><div>import paramiko</div><div>import os</div><div>ssh = paramiko.SSHClient()</div>
<div>ssh.connect('10.10.10.10', username='ufuk', password='ufuk')<br></div><div><br></div><div style>But I'm getting this error:</div><div style><br></div><div style><div>>>> </div><div>
<br></div><div>Traceback (most recent call last):</div><div>  File "C:/Users/eufuesk/Desktop/paramiko.py", line 1, in <module></div><div>    import paramiko</div><div>  File "C:/Users/eufuesk/Desktop\paramiko.py", line 4, in <module></div>
<div>    ssh = paramiko.SSHClient()</div><div>AttributeError: 'module' object has no attribute 'SSHClient'</div><div>>>> </div><div><br></div><div style>Anybody familiar with paramiko?</div></div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2012/12/20 Prasad, Ramit <span dir="ltr"><<a href="mailto:ramit.prasad@jpmorgan.com" target="_blank">ramit.prasad@jpmorgan.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">Ufuk Eskici wrote:<br>
> Hello,<br>
><br>
> I run this command and opens putty:<br>
><br>
> import os<br>
> import subprocess<br>
> command = '"c:\Program Files\Putty\putty.exe" -ssh <a href="mailto:ufukeskici@10.10.10.10">ufukeskici@10.10.10.10</a> -pw test<br>
> subprocess.Popen(command)<br>
><br>
> But then I want to input new commands to this Putty new window. How can I do it?<br>
><br>
<br>
</div></div>Do you need to control Putty or just SSH to another computer?<br>
If all you need to SSH then I would recommend using a 3rd<br>
party module such as Fabric (which relies on Paramiko). Those modules<br>
will simply SSH significantly. They are Python 2.x but you should<br>
be able to use Paramiko in 3.x except for SFTP. This link might help<br>
to install Paramiko if you are using Python 3. <a href="https://github.com/paramiko/paramiko/issues/16" target="_blank">https://github.com/paramiko/paramiko/issues/16</a><br>
<br>
If you need to control Putty specifically then I cannot help.<br>
<br>
<br>
Ramit<br>
<br>
<br>
This email is confidential and subject to important disclaimers and<br>
conditions including on offers for the purchase or sale of<br>
securities, accuracy and completeness of information, viruses,<br>
confidentiality, legal privilege, and legal entity disclaimers,<br>
available at <a href="http://www.jpmorgan.com/pages/disclosures/email" target="_blank">http://www.jpmorgan.com/pages/disclosures/email</a>.<br>
</blockquote></div><br></div>