[Tutor] ssh from Windows to a Solaris server

Do Nguyen (donguye) donguye at cisco.com
Mon Feb 20 22:17:48 CET 2012

I'm a newbie in python programming ...


I wrote the followings to ssh from Windows to a Solaris server:


command1 = "plink -ssh -pw myPassword myUserName at myServerIP"

p1 = subprocess.Popen(command1)

p2 = subprocess.Popen('ls')


I could verify that command1 was executed successfully, ie. the ssh to
myServer worked, but command2 was treated locally in the Windows and was
not executed on the server.  The error was as follows:


Traceback (most recent call last):

  File "C:\Python32\ProgramFiles\test-paramiko.py", line 42, in <module>

    p2 = subprocess.Popen('ls')

  File "C:\Python32\lib\subprocess.py", line 741, in __init__

    restore_signals, start_new_session)

  File "C:\Python32\lib\subprocess.py", line 960, in _execute_child


WindowsError: [Error 2] The system cannot find the file specified


Any hint ?  I am using python 3.2 and did try to install paramiko but
could not make it works.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120220/a3c5184e/attachment.html>

More information about the Tutor mailing list