[scponly] --enable-passwd-compat and echo'd passwords

Kaleb Pederson kpederson at mail.ewu.edu
Thu Mar 24 13:19:37 EST 2005


Thanks David.  It works fine on the commandline directly, but not over ssh.... 
using bash as test's shell:

# ssh -o PreferredAuthentications=password test at localhost
test at localhost's password:
Last login: Thu Mar 24 08:05:41 2005 from localhost.localdomain
test at kinux test $ ls
echotest
test at kinux test $ ./echotest
Echoing output...
aoeu
Not Echoing output...
aoeu
test at kinux test $

Thanks.

--Kaleb


On Thursday 24 March 2005 8:58 am, you wrote:
> Done a little more research and stumbled across some code which might do
> what you need. I've tested it under Linux by calling ttyecho(0, 0) which
> turns off echo and I can't see my keystrokes. Calling ttyecho(0, 1)
> turns echo back on.
>
> Code is as follows:
>
> #include <stdio.h>
> #include <termios.h>
>
> int ttyecho(int fd, int on)
> {
>         struct termios term;
>
>         if (tcgetattr(fd, &term) == -1)
>                 return -1;
>
>         if (on)
>                 term.c_lflag |= ECHO;
>         else
>                 term.c_lflag &= ~ECHO;
>
>         return tcsetattr(fd, TCSADRAIN, &term);
> }
>
> Regards,
> David.



More information about the scponly mailing list