Configuring Password-free Login to an ECS
Scenarios
This section describes how to configure an ECS to enable password-free login to it.
Background Information
$: indicates performing an operation as a common user.
#: indicates performing an operation as a super user.
Run the sudo su command to switch from a common user to a super user.
Prerequisites
An ECS has been created successfully and an EIP has been bound to it.
Procedure
- Use PuTTY and a key pair to log in to an ECS in the cluster.
- Run the following command to disable user logout upon system timeout:
# TMOUT=0
- Copy the ECS private key file (for example *.pem) to the .ssh directory and name it as id_rsa.
$ cd ~/.ssh
$ mv *.pem id_rsa
- Run the following command to configure permissions of the key file:
$ sudo chmod 600 id_rsa
- Run the following command to query the host name:
# hostname
- Run the following command to add the private network IP address and name of the host:
# vi /etc/hosts
An example command is as follows:
192.168.0.1 ecs-ff-0001
- Run the following commands to log in to the node using SSH and check whether you can log in to the ECS without a password:
For example, if the hostname is hostname1, run the following commands:
$ ssh localhost
$ ssh hostname1
Last Article: Creating an ECS That Supports InfiniBand NICs
Next Article: Installing and Using MPIs
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.