Connect to a Linux instance by using SSH commands in Linux or Mac OS X
This topic describes how to use SSH commands to connect to a Linux instance.
Prerequisites
The instance and the security group are created. The instance is in the Running state. A login password is set for the instance. An Elastic IP address (EIP) is bound with the instance. An inbound security group rule is added to the security group to allow the SSH port.
Rule direction | Authorization on policy | Protocol type | Port range | Priority | Authorization on type | Authorization on object |
---|---|---|---|---|---|---|
Inbound | Accept | tcp | 22/22 | 1 | IPv4 CIDR block | 0.0.0.0/0 |
Procedure
1. Enter the following command and press the Enter key.
ssh root@instanceIP
- Enter the instance password of the root user and press the Enter key.