Got it

How Do I Generate Public and Private Keys of the FusionCompute Node Serving as the SSH Server?

Created: Jun 22, 2021 02:06:41Latest reply: Nov 18, 2021 13:08:32 321 3 0 0 0
  HiCoins as reward: 0 (problem unresolved)

Hello, team!

I want to generate public and private keys of the FusionCompute node serving as the SSH server, what can I do?

Can you help me?

  • x
  • convention:

Featured Answers
olive.zhao
Admin Created Jun 22, 2021 02:46:31

Hello, friend!

The following uses FusionCompute 8.0 as an example.

1. Use PuTTY to log in to the node for which the known_hosts file is to be updated.

Ensure that the management IP address and username gandalf are used to establish the connection.

The system supports the login authentication using a password or private-public key pair. If you use a private-public key pair to authenticate the login, see How Do I Use PuTTY to Log In to a Node in Key Pair Authentication Mode?

2. Run the following command and enter the password of the root user to switch to the root user:

su - root

3. Run the following command to disable user logout upon system timeout:

TMOUT=0

4. Run the following command to obtain the public key of the SSH server to be logged in and add the public key to the known_hosts file:

ssh-keyscan -t rsa IP address of the SSH server >> /root/.ssh/known_hosts

If multiple IP addresses are configured for the SSH server, this operation must be performed for each IP address.

The known_hosts file is updated if information similar to the following is displayed in the x86 architecture:

#192.168.128.10 SSH-2.0-OpenSSH_X.X

The known_hosts file is updated if information similar to the following is displayed in the ARM architecture:

#192.168.61.100 SSH-2.0-OpenSSH_X.X

5. Run the following command to connect to the SSH server and check whether the login is successful:

ssh gandalf@IP address of the SSH server

Hope this can help you!

View more
  • x
  • convention:

All Answers
olive.zhao
olive.zhao Admin Created Jun 22, 2021 02:07:37

Hello, friend!

Have a nice day!

What's the version of your FusionCompute?

View more
  • x
  • convention:

olive.zhao
olive.zhao Admin Created Jun 22, 2021 02:46:31

Hello, friend!

The following uses FusionCompute 8.0 as an example.

1. Use PuTTY to log in to the node for which the known_hosts file is to be updated.

Ensure that the management IP address and username gandalf are used to establish the connection.

The system supports the login authentication using a password or private-public key pair. If you use a private-public key pair to authenticate the login, see How Do I Use PuTTY to Log In to a Node in Key Pair Authentication Mode?

2. Run the following command and enter the password of the root user to switch to the root user:

su - root

3. Run the following command to disable user logout upon system timeout:

TMOUT=0

4. Run the following command to obtain the public key of the SSH server to be logged in and add the public key to the known_hosts file:

ssh-keyscan -t rsa IP address of the SSH server >> /root/.ssh/known_hosts

If multiple IP addresses are configured for the SSH server, this operation must be performed for each IP address.

The known_hosts file is updated if information similar to the following is displayed in the x86 architecture:

#192.168.128.10 SSH-2.0-OpenSSH_X.X

The known_hosts file is updated if information similar to the following is displayed in the ARM architecture:

#192.168.61.100 SSH-2.0-OpenSSH_X.X

5. Run the following command to connect to the SSH server and check whether the login is successful:

ssh gandalf@IP address of the SSH server

Hope this can help you!

View more
  • x
  • convention:

Unicef
Unicef MVE Created Nov 18, 2021 13:08:32

Good answer
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.