< Home

ssh user service-type

Function

The ssh user service-type command configures a service type for an SSH user.

The undo ssh user service-type command restores the default service type for an SSH user.

By default, no service type is configured for an SSH user.

Format

ssh user user-name service-type { sftp | stelnet | all }

undo ssh user user-name service-type

Parameters

Parameter Description Value
user-name Specifies the SSH user name.
The value is a string of 1 to 64 case-insensitive characters without spaces.
NOTE:

The string can contain spaces if it is enclosed with double quotation marks (").

sftp Specifies the SFTP service type. -
stelnet Specifies the STelnet service type. -
all

Specifies the SFTP and STelnet service types.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To configure a service type for an SSH user, run the ssh user service-type command on a device. If the specified user does not exist, the device creates an SSH user who has the same name as the specified user and uses the configured service type for the SSH user.

Precautions

If the SFTP service type is configured for an SSH user, you need to run the ssh user sftp-directory command to set an authorized directory for the user. By default, the SFTP service authorized directory is flash: for the SSH user.

Example

# Configure the all service type for an SSH user John.

<HUAWEI> system-view
[HUAWEI] ssh user john service-type all
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >