The esxcli iscsi adapter auth commands enable iSCSI authentication. Mutual authentication is supported for software iSCSI and dependent hardware iSCSI, but not for independent hardware iSCSI (see Setting iSCSI CHAP).esxcli <conn_options> iscsi adapter auth chap set --direction=uni --chap_username=<name> --chap_password=<pwd> --level=[prohibited, discouraged, preferred, required] --secret=<string> --adapter=<adapter_name>
■ per-adapter CHAP: esxcli iscsi adapter auth chap set
■ per-discovery CHAP: esxcli iscsi adapter discovery sendtarget auth chap set
■ per-target CHAP: esxcli iscsi adapter target portal auth chap setesxcli <conn_options> iscsi adapter auth chap set --direction=uni --chap_username=User1 --chap_password=MySpecialPwd --level=preferred --secret=uni_secret --adapter=vmhba33
2 (Optional) Set the authentication information for mutual CHAP by running esxcli iscsi adapter auth chap set again with the -d option set to mutual option and a different authentication user name and secret.esxcli <conn_options> iscsi adapter auth chap set --direction=mutual --mchap_username=<m_name> --mchap_password=<m_pwd> --level=[prohibited, required] --secret=<string> --adapter=<adapter_name>
■ prohibited – The host does not use CHAP authentication. If authentication is enabled, specify chapProhibited to disable it.
■ required – The host requires successful CHAP authentication. The connection fails if CHAP negotiation fails. You can set this value for mutual CHAP only if CHAP is set to chapRequired.For direction, specify mutual.
Important You are responsible for making sure that CHAP is set before you set mutual CHAP, and for using compatible levels for CHAP and mutual CHAP. Use a different secret in CHAP and mutual CHAP.esxcli <conn_options> iscsi adapter auth chap set --direction=uni --chap_username=<name> --chap_password=<pw> --level=[prohibited, discouraged, preferred, required] --secret=<string> --adapter=<adapter_name>esxcli <conn_options> iscsi adapter auth chap set --direction=mutual --mchap_username=<m_name> --mchap_password=<m_pwd> --level=[prohibited, required] --secret=<string> --adapter=<adapter_name>
■ CHAP and mutual CHAP use different user names and passwords. The second user name and password are supported for mutual authentication on the storage side.The vicfg-iscsi -A -c options enable iSCSI authentication. Mutual authentication is supported for software iSCSI and dependent hardware iSCSI, but not for independent hardware iSCSI. See Setting iSCSI CHAP.[-i <stor_ip_addr|stor_hostname> [:<portnum>] [-n <iscsi_name]] <adapter_name>-w <ma_password> [-i <stor_ip_addr|stor_hostname> [:<portnum>]
■ CHAP and mutual CHAP use different user names and passwords. The second user name and password are supported for mutual authentication on the storage side.