High Performance ComputingHigh Performance Computing

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Updated at: May 09, 2022 GMT+08:00

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 an administrator.

Run the sudo su command to switch from a common user to an administrator.

Prerequisites

An ECS has been created successfully and an EIP has been bound to it.

Procedure

  1. Use PuTTY and a key pair to log in to an ECS in the cluster.
  2. Run the following command to disable user logout upon system timeout:

    # TMOUT=0

  3. 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

  4. Run the following command to configure permissions of the key file:

    $ sudo chmod 600 id_rsa

  5. Run the following command to query the host name:

    # hostname

  6. 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

  7. 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

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel