Add passwd opts checking to key_opts

fix #16147