< Home

Configuring SSH Parameters

This section provides a sample of configuring SSH parameters using the config method.

Table 1 Configuring SSH parameters

Operation

XPATH

edit-config:config

  • /huawei-ssh-server:ssh-server/default-authentication-type
  • /huawei-ssh-server:ssh-server/user/name
  • /huawei-ssh-server:ssh-server/user/authentication-type
  • /huawei-ssh-server:ssh-server/user/service-type

Data Requirements

Table 2 Configuring SSH parameters

Item

Data

Description

SSH user

a

Set the SSH user name to a.

SSH authentication type

password

Set the SSH authentication type to password authentication.

Authentication mode of SSH users

password

Set the authentication mode of SSH users to password authentication.

Service type of SSH users

all

Set the service types of SSH users to SFTP and STelnet.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <ssh:ssh-server xmlns:ssh="urn:huawei:params:xml:ns:yang:huawei-ssh-server">
        <ssh:default-authentication-type>password</ssh:default-authentication-type>
        <ssh:user>
          <ssh:name>a</ssh:name>
          <ssh:authentication-type>password</ssh:authentication-type>
          <ssh:service-type>all</ssh:service-type>
        </ssh:user>
      </ssh:ssh-server>
    </config>
  </edit-config>
</rpc>

Response Example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?> 
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> 
  <ok/> 
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic