determining whether passwd auth succeeds

Lucas Fisher ljfisher at iastate.edu
Sat Aug 11 16:29:32 EST 2001


Hi,
I'm writing a c++ wrapper around ssh for KDE, mainly for use in a sftp 
client.  My problem is when starting ssh with the sftp subsystem openssh 
gives no indication that password authentication succeeded.  This makes it 
difficult for my wrapper to determine if the connection succeeded.  Now 
determining it didn't succeed can be done by checking for another password 
prompt.  The problem with this is password verification could take time 
(correct?).  So if I send the password then immediately do a read from the 
terminal, there is no guarantee I'll get the second password prompt if the 
password was incorrect, right?  I could wait a couple of seconds and if I 
don't get another password prompt  assume authentication succeeded, but this 
is a bad solution. Are there any other techniques I could employ?

thanks,
Lucas



More information about the openssh-unix-dev mailing list