No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference 10

OceanStor 18500 V3 and 18800 V3 Mission Critical Storage System V300R003

"Based on the CLI, 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. The document that you browse online matches the latest C version of the product. Click Download to download documents of other C versions."
Rate and give feedback:
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 of the SSH server.

Format

import ssh_host_key_file key_type=? ip=? user=? password=? public_key_file=? private_key_file=? [ protocol=? ] [ port=? ]

Parameters

Parameter

Description

Value

key_type=? Type of the encryption algorithm of the imported public key file and private key file.

The value can be "rsa", "dsa", or "ecdsa", 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.

password=? Password of a user supported by the FTP/SFTP server.

The value contains 1 to 64 characters.

public_key_file=? Path for storing the public key file on the FTP/SFTP server.

-

private_key_file=? Path for storing the private key file on the FTP/SFTP server.

-

protocol=? Protocol used for transmitting the new public and private key files.

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 from 1 to 65535.

  • If "protocol" is set to "FTP", the default value is "21".
  • If "protocol" is set to "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 a private key file.
  • Run the "import ssh_host_key_file" command to import the public key file and private key file.
NOTE:
1.If the public key file and private key file generated using a non-RSA, non-DSA, or non-ECDSA algorithm or invalid public key file and private key file are imported, the RSA, DSA, and ECDSA algorithm will not be used for connection encryption upon the SSH connection setup next time.

Example

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

admin/>import ssh_host_key_file key_type=ecdsa ip=192.168.8.211 user=admin passsword=****** public_key_file=ssh_host_ecdsa_key.pub private_key_file=ssh_host_ecdsa_key protocol=FTP port=21
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.
Have you read danger alert message carefully?(y/n)y
 
Are you sure you really want to perform the operation?(y/n)Y
Command executed successfully.

System Response

None

Translation
Download
Updated: 2019-07-22

Document ID: EDOC1000084078

Views: 317711

Downloads: 253

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next