Re: [Tutor] ssh connection

2012-12-18 Thread Alan Gauld
On 18/12/12 09:26, शंतनू wrote: You may also like to have a look at 'commands' module, especially when no user input is required. I agree commands is easy to use but it is deprecated in favour of subprocess. And I suspect in this case the use will be interactive. -- Alan G Author of the Le

Re: [Tutor] ssh connection

2012-12-18 Thread शंतनू
On 18/12/12 7:51 PM, Alan Gauld wrote: > 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 >> -pw [password] >> >> But I dont know how to send this c

Re: [Tutor] ssh connection

2012-12-18 Thread Alan Gauld
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 -pw [password] But I dont know how to send this command from Pyhton. :( Have you read the subprocess modul

Re: [Tutor] ssh connection

2012-12-18 Thread Ufuk Eskici
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 -pw [password] But I dont know how to send this command from Pyhton. :( 2012/12/17 Prasad, Ramit > Please always include the list in your response (I have CC-ed t

Re: [Tutor] ssh connection

2012-12-17 Thread Prasad, Ramit
Please always include the list in your response (I have CC-ed the list). Ufuk Eskici wrote: > > Subprocess seems complicated, didnt understand. > > Also tried pexpect but couldnt install on Windows. Subprocess can be daunting to try and pick up, but it is not as bad as it looks at first glance.

Re: [Tutor] ssh connection

2012-12-17 Thread Prasad, Ramit
Ufuk Eskici wrote: > > Hello All, > > Can we make an SSH connection with Pyhton 3.3 ? > > I want to connecto to my router, send commands and receive outputs. > > Thanks. > Ufuk You can try to use Paramiko. You may need to build it and it seems like it may work except for SFTP. https://github

Re: [Tutor] ssh connection

2012-12-17 Thread Brad Hudson
Look at the subprocess module. You can send your SSH connections via subprocess and collect the output for parsing. On Mon, Dec 17, 2012 at 7:40 AM, Ufuk Eskici wrote: > Hello All, > > Can we make an SSH connection with Pyhton 3.3 ? > > I want to connecto to my router, send commands and receive

Re: [Tutor] ssh connection

2012-12-17 Thread Tom Tucker
One option is PyExpect http://www.noah.org/python/pexpect/ On Mon, Dec 17, 2012 at 8:40 AM, Ufuk Eskici wrote: > Hello All, > > Can we make an SSH connection with Pyhton 3.3 ? > > I want to connecto to my router, send commands and receive outputs. > > Thanks. > Ufuk > > __