[Tutor] ssh connection

Alan Gauld alan.gauld at btinternet.com
Tue Dec 18 09:51:18 CET 2012


On 18/12/12 08:03, Ufuk Eskici wrote:
> I have Putty and I it runs from CMD successfully.
>
> *C:\Users\eufuesk>*"c:\Program Files\Putty\putty.exe" -ssh
> [username]@10.0.0.1 <http://10.0.0.1>
>   -pw [password]
>
> But I dont know how to send this command from Pyhton. :(

Have you read the subprocess module documentation?
It provides many examples of running commands.

The raw Popen class can be a bit intimidating but there are wrapper 
functions that make it easier for simple applications.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list