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.
ssh user user-name service-type { sftp | stelnet | all }
undo ssh user user-name service-type
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. |
- |
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.