10.2. 为发起方设置 Challenge-Handshake Authentication Protocol
通过使用 Challenge-Handshake Authentication Protocol(CHAP)
,用户可以使用密码保护目标。发起方必须了解这个密码才能连接到目标。
先决条件
- 创建 iSCSI initiator。如需更多信息,请参阅创建 iSCSI 启动器。
-
为目标设置
CHAP
。如需更多信息,请参阅 为目标设置 Challenge-Handshake Authentication Protocol。
步骤
在
iscsid.conf
文件中启用 CHAP 验证:# vi /etc/iscsi/iscsid.conf node.session.auth.authmethod = CHAP
默认情况下,
node.session.auth.authmethod
设置为None
在
iscsid.conf
文件中添加目标用户名
和密码
:node.session.auth.username = redhat node.session.auth.password = redhat_passwd
启动
iscsid
守护进程:# systemctl start iscsid.service
其他资源
-
您系统上的
iscsiadm (8)
手册页