-n vs batch_mode vs batch_flag
Tom Holroyd
tomh at po.crl.go.jp
Fri Apr 6 21:11:11 EST 2001
How is -n supposed to work? When you say ssh -n, it sets stdin_null_flag
but not batch mode. When the client is choosing authmethods, there is a
batch_flag that is tested to see (presumably) if we are in batch mode or
perhaps if -n has been given. But nothing sets it. It looks like it's
supposed to point to options.batch_mode, but it's never even initialized!
Even if it did point to batch_mode, that's independent of -n, so when you
say -n it still (tries to) ask for a password.
% ssh -n localhost &
[1] 5220
% tomh at localhost's password:
[1] + Suspended (tty input) ssh -n localhost
It seems to me that -n (without -f) should mean "stdin doesn't exist, so
don't try any authmethods that ask for passwords from stdin", which would
imply that it should set batch_mode too, and batch_flag should point to
that. Or maybe batch_mode should be checked instead of batch_flag.
Or is this all supposed to be handled somehow by ssh-askpass (which is
currently only used by ssh-agent)?
Thanks,
Dr. Tom
More information about the openssh-unix-dev
mailing list