thefuyang / parallel-ssh

Automatically exported from code.google.com/p/parallel-ssh
Other
0 stars 0 forks source link

pssh -A failes on Mac OS X with ssh error about /dev/tty #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. pssh -x '-vvv' -O StrictHostKeyChecking=no -i -A -o pssh-out/ -e pssh-error/ 
-v -H root@somehost uptime

What is the expected output? What do you see instead?
Should prompt for password, ssh in, and then show me the uptime.

What version of the product are you using? On what operating system?
Mac OS X 10.6.7, latest version of pssh. 2.2.2.

Please provide any additional information below.
Here's the relevant output from ssh:

debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 1432711545
Password:
debug3: packet_send2: adding 32 (len 14 padlen 18 extra_pad 64)
debug1: Authentications that can continue: 
publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).

Original issue reported on code.google.com by bly...@gmail.com on 23 May 2011 at 5:41

GoogleCodeExporter commented 8 years ago
The /dev/tty message looks like an error, but it's actually perfectly normal.  
Once ssh realizes it can't use /dev/tty, it should then use pssh-askpass.  
Unfortunately, ssh isn't giving quite enough information to tell what is going 
on.  It sort of looks like it got a password and is trying to use it.  Not to 
belabor the obvious, but can I assume that you've tried doing "ssh 
root@somehost" manually while typing in the same password?

Original comment by amcna...@gmail.com on 23 May 2011 at 6:06

GoogleCodeExporter commented 8 years ago
I just added a commit that makes pssh-askpass more verbose.  I think this will 
help in tracking down your problem.  Are you comfortable with getting the 
latest commit from the git repository, or would you be more comfortable if I 
were to provide you with a tarball?

Original comment by amcna...@gmail.com on 23 May 2011 at 6:24

GoogleCodeExporter commented 8 years ago
Yeah, I can ssh as root to the host manually.  I'll grab from git and give it a 
shot.  Thanks!

Original comment by bly...@gmail.com on 23 May 2011 at 7:55

GoogleCodeExporter commented 8 years ago
Hmm.  I did a git clone, and then 'sudo python setup.py install', but it 
complains:

> /usr/local/bin/pssh -x '-vvv' -O StrictHostKeyChecking=no -i -A -o pssh-out/ 
-e pssh-error/ -v -H root@somehost uptime
Traceback (most recent call last):
  File "/usr/local/bin/pssh", line 24, in <module>
    from psshlib.manager import Manager, FatalError
ImportError: No module named manager

Original comment by bly...@gmail.com on 23 May 2011 at 8:22

GoogleCodeExporter commented 8 years ago
Never mind.  That was an error from me messing around with other installs.

Original comment by bly...@gmail.com on 23 May 2011 at 8:58

GoogleCodeExporter commented 8 years ago
Here's a snippet which shows the only new info from verbose pssh-askpass:

debug1: permanently_drop_suid: 1432711545
pssh-askpass received prompt: "Password:"
Password:
debug3: packet_send2: adding 32 (len 14 padlen 18 extra_pad 64)
debug1: Authentications that can continue: 
publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).

Original comment by bly...@gmail.com on 23 May 2011 at 9:01

GoogleCodeExporter commented 8 years ago
I finally see what's happening.  On my machine, the password prompt is 
"Password: ", but on yours, it's "Password:" (without the trailing space).  I 
can easily make pssh work regardless of whether there's a trailing space, but I 
would like to know the cause for the difference.  I would hate to find that 
there's some other value that the prompt might be that we're still missing.  
Let me look into this.

Original comment by amcna...@gmail.com on 23 May 2011 at 10:31

GoogleCodeExporter commented 8 years ago
I've now pushed a fix, but I'm still worried that someone will come along with 
a different prompt that doesn't work. :(  Anyway, let me know if you have any 
more trouble.  Thanks for helping out with tracking this down.

Original comment by amcna...@gmail.com on 24 May 2011 at 2:27

GoogleCodeExporter commented 8 years ago
That worked great.  Thanks!

Original comment by bly...@gmail.com on 24 May 2011 at 3:11