[BUG] Password handling when real ssh is available

Nathaniel McCallum npmccallum at gentoo.org
Wed Nov 30 18:13:30 GMT 2005


On Wed, 2005-11-30 at 11:51 -0600, Matthew D. Fuller wrote:
> On Wed, Nov 30, 2005 at 11:44:34AM -0600 I heard the voice of
> John A Meinel, and lo! it spake thus:
> > 
> > We do, but we would like to pass ssh the password that was set
> 
> Which in the current openssh, I don't think we can force, since if it
> CAN open the current tty directly via /dev/tty, it always will.  Of
> course, I'm going on a few-year-old memory and a quick check of the
> source, so I could be (and would love to be shown) wrong.

Write a program that does the following:
1. Opens up some IPC (unix-socket,msgqueue, shmem)
2. Set SSH_ASKPASS
3. ioctl(0, TIOCNOTTY)  
# Fools ssh into thinking its not on a terminal
# ssh will then attempt to run the program in SSH_ASKPASS
4. $SSH_ASKPASS connects to the parent IPC and gets password
5. Tada!

It actually does work, I've done it before.

Nathaniel





More information about the bazaar mailing list