Password authentication enabled Stelnet server configuration example

Network requirements

As shown in Figure 91:

Figure 91: Network diagram

Configuration procedure

  • Configure the Stelnet server:

  • # Generate RSA key pairs.

    <Switch> system-view
    [Switch] public-key local create rsa
    The range of public key size is (512 ~ 2048).
    NOTES: If the key modulus is greater than 512,
    It will take a few minutes.
    Press CTRL+C to abort.
    Input the bits of the modulus[default = 1024]:
    Generating Keys...
    ++++++++
    ++++++++++++++
    +++++
    ++++++++
    

    # Generate a DSA key pair.

    [Switch] public-key local create dsa
    The range of public key size is (512 ~ 2048).
    NOTES: If the key modulus is greater than 512,
    It will take a few minutes.
    Press CTRL+C to abort.
    Input the bits of the modulus[default = 1024]:
    Generating Keys...
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    +++++++++++++++++++++++++++++++++++
    

    # Generate an ECDSA key pair.

    [Switch] public-key local create ecdsa secp256r1
    Generating Keys... 
    

    # Enable the SSH server function.

    [Switch] ssh server enable
    

    # Configure an IP address for VLAN-interface 2. The Stelnet client uses this address as the destination address of the SSH connection.

    [Switch] interface vlan-interface 2
    [Switch-Vlan-interface2] ip address 192.168.1.40 255.255.255.0
    [Switch-Vlan-interface2] quit
    

    # Set the authentication mode to AAA for the user interfaces.

    [Switch] user-interface vty 0 15
    [Switch-ui-vty0-15] authentication-mode scheme
    

    # Enable the user interface to support SSH.

    [Switch-ui-vty0-15] protocol inbound ssh
    [Switch-ui-vty0-15] quit
    

    # Create local user client001. Specify the password ass aabbcc and the service type as ssh for the user.

    [Switch] local-user client001
    [Switch-luser-client001] password simple aabbcc
    [Switch-luser-client001] service-type ssh
    [Switch-luser-client001] quit
    

    # Create an SSH user client001. Specify the service type as stelnet and the authentication method as password for the user.

    [Switch] ssh user client001 service-type stelnet authentication-type password
    
  • Establish a connection to the Stelnet server:

  • The device supports a variety of Stelnet client software, such as PuTTY and OpenSSH. The following is an example of configuring Stelnet client using PuTTY Version 0.58.

    To establish a connection to the Stelnet server:

    1. Launch PuTTY.exe on the Stelnet client to enter the interface as shown in Figure 92.

    2. In the Host Name (or IP address) filed, enter the IP address of the Stelnet server 192.168.1.40.

    Figure 92: Specifying the host name (or IP address)

    1. Click Open to connect to the server.

    If the connection is successfully established, the system prompts you to enter the username and password. After entering the username (client001) and password (aabbcc), you can enter the CLI of the server.