[Tutor] pexpect interactive password entry for luks device

2014-11-24 Thread Adam Gold
I'm trying to do something really simply (I think) with pexpect but must be missing an obvious step. I want to ssh from host to guest, establish a CIFS connection on the guest to a share somewhere else on the local network, open a luks loop device on the share by entering the password (I don't wan

Re: [Tutor] Pexpect maxread & searchwindowsize, timeout

2009-10-20 Thread Nathan Farrar
Thanks! That solves my question about configuring the timeout value. However - I still have the problem (I believe) that by default, I can handle all the output. When I issue the "show version" it fails, but if I issue a command with less data returned it succeeds. In the documentation I can see

Re: [Tutor] Pexpect maxread & searchwindowsize, timeout

2009-10-20 Thread vince spicer
On Tue, Oct 20, 2009 at 11:11 AM, Nathan Farrar wrote: > I haven't been able to find any real examples of pexpect usage, nor > documentation. Just little bits here and there, so I'm kind of > struggling through. > > I've got the follow bit of code I'm working with: > > def main(): >try: >

[Tutor] Pexpect maxread & searchwindowsize, timeout

2009-10-20 Thread Nathan Farrar
I haven't been able to find any real examples of pexpect usage, nor documentation. Just little bits here and there, so I'm kind of struggling through. I've got the follow bit of code I'm working with: def main(): try: print 'attempting to spawn connection ... ' session = pexp

[Tutor] Pexpect latest version.

2009-08-24 Thread Mac Ryan
Hello everybody, this is more a request of info than of help. I want to play around with pexpect a bit, but I am confused on what is the latest stable version. On SF (linked from the site of the pexpect developer) http://pexpect.sourceforge.net/pexpect.html it seems the latest version (

[Tutor] pexpect/pxssh

2008-10-07 Thread Vinay Reddy
Hi, I wish to automate some of my network related tasks, which involves sshing into a remote box and executing some commands. I looked at pxssh for that purpose but it seems to throw an exception when I have ssh keys setup so that logins can happen without explicit password authentication. Is ther

Re: [Tutor] pexpect

2008-09-20 Thread Steve Poe
James, I've not used pexpect, but I've done this on a Cisco switch. I found using time.sleep and read_until of the telnet class to be helpful. 10 tn = telnetlib.Telnet('') 11 #tn.set_debuglevel(9) 12 tn.read_until('Username: \xff', 5) 13 time.sleep(10) 14 tn.write('\

[Tutor] pexpect

2008-09-20 Thread James
Folks, Does anyone here have experience with pexpect? I'm trying to write a pexpect script which will log into a network device, gather statistics, and then dump the raw output into a file (or a string so that I can manipulate it). I'm not having much luck. Because the connection is telnet I was

[Tutor] Pexpect logging out from a remote terminal

2006-05-25 Thread kieran flanagan
Hey I have a script that logs into a remote terminal over ssh and executes a script i.e. 1. Script logs into remote terminal over ssh 2. Executes another script that resides on the remote terminal, with the command 'child.sendline(cmdString)', where cmdString is a reference to the local script be