Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96178

Re: issue while doing pexpect ssh

X-Received by 10.129.154.212 with SMTP id r203mr28823611ywg.12.1441790390853; Wed, 09 Sep 2015 02:19:50 -0700 (PDT)
X-Received by 10.140.17.73 with SMTP id 67mr195633qgc.17.1441790390775; Wed, 09 Sep 2015 02:19:50 -0700 (PDT)
Path csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!v79no1789353qge.0!news-out.google.com!l36ni307qgd.1!nntp.google.com!v79no1789352qge.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Wed, 9 Sep 2015 02:19:50 -0700 (PDT)
In-Reply-To <3f4642c2-d548-4089-87c2-f3abb4ccb224@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=151.151.16.25; posting-account=1SpZ5woAAAA9asrWwzRpL93v3FfBemIc
NNTP-Posting-Host 151.151.16.25
References <3f4642c2-d548-4089-87c2-f3abb4ccb224@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <21277811-df80-49d8-9249-c58b7fdf01c2@googlegroups.com> (permalink)
Subject Re: issue while doing pexpect ssh
From harirammanohar159@gmail.com
Injection-Date Wed, 09 Sep 2015 09:19:50 +0000
Content-Type text/plain; charset=ISO-8859-1
X-Received-Bytes 1603
X-Received-Body-CRC 1618176552
Xref csiph.com comp.lang.python:96178

Show key headers only | View raw


On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com  wrote:
> Some where i am missing simple logic.... :)
> 
> =====
> child = pexpect.spawn('ssh hari@hostname')
> child.logfile = sys.stdout
> child.expect('hari\'s Password: ')
> =====
> 
> getting error as follows:
> ============
> child.expect('hari\'s Password: ')
> TypeError: must be str, not bytes
> ===========
> 
> Thanks...

Hey All,

I am able to achieve this using pxssh.. thank you for help...

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-08 04:37 -0700
  Re: issue while doing pexpect ssh Laura Creighton <lac@openend.se> - 2015-09-08 14:12 +0200
  Re: issue while doing pexpect ssh Chris Angelico <rosuav@gmail.com> - 2015-09-08 23:57 +1000
  Re: issue while doing pexpect ssh jmp <jeanmichel@sequans.com> - 2015-09-08 16:56 +0200
  Re: issue while doing pexpect ssh Laura Creighton <lac@openend.se> - 2015-09-08 18:43 +0200
  Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 01:58 -0700
    Re: issue while doing pexpect ssh Laura Creighton <lac@openend.se> - 2015-09-09 12:45 +0200
  Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 02:19 -0700
    Re: issue while doing pexpect ssh Laura Creighton <lac@openend.se> - 2015-09-09 12:47 +0200
  Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 04:22 -0700
  Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 22:18 -0700
  Re: issue while doing pexpect ssh harirammanohar159@gmail.com - 2015-09-09 23:08 -0700

csiph-web