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!