AWS Storage Gateway User Guide
Configuring CHAP Authentication
The following command removes the configuration for the
myvolume
target.
sudo /sbin/iscsiadm --mode node --op delete --targetname
iqn.1997-05.com.amazon:myvolume
3. Edit the iSCSI configuration file to enable CHAP.
a. Get the name of the initiator (that is, the client you are using).
The following command gets the initiator name from the
/etc/iscsi/
initiatorname.iscsi
file.
sudo cat /etc/iscsi/initiatorname.iscsi
The output from this command looks like this:
InitiatorName=iqn.1994-05.com.redhat:8e89b27b5b8
b. Open the
/etc/iscsi/iscsid.conf
file.
c.
Uncomment the following lines in the file and specify the correct values for
username
,
password
,
username_in
, and
password_in
.
node.session.auth.authmethod = CHAP
node.session.auth.username =
username
node.session.auth.password =
password
node.session.auth.username_in =
username_in
node.session.auth.password_in =
password_in
For guidance on what values to specify, see the following table.
Configuration
Setting
Value
username
The initiator name that you found in a previous step in
this procedure. The value starts with
iqn
. For example,
iqn.1994-05.com.redhat:8e89b27b5b8
is a valid
username
value.
password
The secret key used to authenticate the initiator (the client you are
using) when it communicates with the volume.
username_in
The IQN of the target volume. The value starts with
iqn
and ends with the target name. For example,
iqn.1997-05.com.amazon:myvolume
is a valid
username_in
value.
password_in
The secret key used to authenticate the target (the volume) when it
communicates to the initiator.
d. Save the changes in the configuration file, and then close the file.
4. Discover and log in to the target. To do so, follow the steps in
Connecting to a Microsoft Windows
API Version 2013-06-30
385