Configuring the switch as an SCP server
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Configure the SSH server. | For more information, see the security guide for your switch. | N/A |
3. Create an SSH user for a SCP client, set the service type to all or scp, and specify the authentication method. | ssh user username service-type { all | scp } authentication-type { password | { any | password-publickey | publickey } assign publickey keyname work-directory directory-name } | N/A |
4. Create a user account and assign a working directory for the SSH user on the switch or a remote server if password authentication is used. |
| Skip this step if publickey authentication, whether with password authentication or not, is used. Make sure that the local user account has the name username as the username specified in the ssh user command. |
When you set the working directory for the user, follow these guidelines:
If only password authentication is used, the working directory specified in the ssh user command does not take effect. You must set the working directory on the remote server or in the local user account for the SSH user.
If publickey authentication, whether with password authentication or not, is used, you must set the working directory in the ssh user command.