Configuring an SSH user

To configure an SSH user that uses publickey authentication, you must perform the procedure in this section.

To configure an SSH user that uses password authentication, whether together with publickey authentication or not, you must configure a local user account by using the local-user command for local authentication, or configure an SSH user account on an authentication server, for example, a RADIUS server, for remote authentication. For more information about the local-user command, see Security Command Reference.

For password-only SSH users, you do not need to perform the procedure in this section to configure them unless you want to use the display ssh user-information command to display all SSH users, including the password-only SSH users, for centralized management.

Configuration guidelines

When you perform the procedure in this section to configure an SSH user, follow these guidelines:

You can set the service type to Stelnet, SFTP, and SCP (Secure copy). For more information about Stelnet, see "Overview." For more information about SFTP, see "Configuring SFTP." For more information about SCP, see "Configuring SCP."

Configuration procedure

To configure an SSH user and specify the service type and authentication method:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create an SSH user, and specify the service type and authentication method.

  • For Stelnet users:

    • In non-FIPS mode:ssh user username service-type stelnet authentication-type { password | { any | password-publickey | publickey } assign publickey keyname&<1-6> }

    • In FIPS mode:ssh user username service-type stelnet authentication-type { password | password-publickey assign publickey keyname&<1-6> }

  • For all users, SCP or SFTP users:

    • In non-FIPS mode:ssh user username service-type { all | scp | sftp } authentication-type { password | { any | password-publickey | publickey } assign publickey keyname&<1-6> work-directory directory-name }

    • In FIPS mode:ssh user username service-type { all | scp | sftp } authentication-type { password | password-publickey assign publickey keyname&<1-6> work-directory directory-name }

Use one of the commands.