Command Reference for Block

OceanStor Dorado V3 Series V300R002

This document is applicable to OceanStor Dorado3000 V3, Dorado5000 V3, Dorado6000 V3 and Dorado18000 V3. Based on the CLI provided by the DeviceManager, this document describes how to use various
commands classified by functions and how to set the CLI and manage the storage system through
these commands.

Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document.
Note: Even the most advanced machine translation cannot match the quality of professional translators.
Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).

import ssh_host_key_file

import ssh_host_key_file

Function

The import ssh_host_key_file command is used to replace the public key file and private key file on the SSH server.

Format

Parameters

Type of the encryption algorithm for the imported public key file and private key file.

Possible value of the "key_type" parameter is "ecdsa" or "dsa" or "rsa" where:

"rsa":Rivest-Shamir-Adleman algorithm(RSA).

"dsa":Digital Signature Algorithm(DSA).

"ecdsa": Elliptic Curve Digital Signature Algorithm (ECDSA).

ip=?

IP address of the FTP/SFTP server.

-

user=?

User allowed by the FTP/SFTP server.

The value contains 1 to 64 characters without colons (:).

password=?

Password of a user allowed by the FTP/SFTP server.

The value contains 1 to 64 characters.

public_key_file=?

Path for storing the public key on the FTP/SFTP server.

-

private_key_file=?

Path for storing the private key on the FTP/SFTP server.

-

protocol=?

Protocol used for transmitting the new public and private key.

The value can be "FTP" or "SFTP". The default value is "SFTP".

To ensure the security of data transfer, you are advised to use Secure File Transfer Protocol (SFTP).

port=?

Port of the FTP/SFTP server.

The value is an integer ranging from 1 to 65535.

If protocol=FTP, the default value is "21".

If protocol=SFTP, the default value is "22".

Level

Super administrator

Usage Guidelines

If you want to use your own SSH public key file and private key file, perform the following steps:

Use the ssh-keygen tool to generate a public key file and private key file encrypted with RSA, DSA, or ECDSA algorithm.

Run the import ssh_host_key_file command to import the public key file and private key file.

NOTE:

If a public key file or private key file is encrypted with a non-RSA, non-DSA, and non-ECDSA algorithm, or an illegal public key file and an illegal private key file are imported, the RSA, DSA, or ECDSA algorithm will not be used for connection encryption when an SSH connection is set up the next time.

Example

Replace the ECDSA public key file and private key file on the SSH server with the ECDSA public key file and private key file provided by the user.

WARNING:You are about to replace the existing SSH public key file and private key file with a self-released SSH public key file and private key file. This operation may cause the Linux-based SSH client unable to connect to the storage array.

Suggestion:Before you perform this operation, implement the following steps:

1. Ensure that the existing SSH public key file and private key file need to be replaced.

2. If the SSH client cannot connect to the storage array, manually clear historical records in file /root/.ssh/known_hosts and reconnect to the storage array.