This topic describes how to use a username and a password to connect to a Linux Elastic Compute Service (ECS) instance from an iOS or Android mobile device.
Prerequisites
The instance to which you want to connect is in the Running state. If the instance is not in the Running state, start the instance. For more information, see Start an instance.
A logon password is set for the instance. If you have not set a password or if you have forgotten the password, you must reset the password for the instance. For more information, see Reset the logon password of an instance.
The instance has Internet connectivity.
To provide Internet connectivity to an instance that resides in a virtual private cloud (VPC), you can assign a public IP address and purchase public bandwidth during the creation of the instance, or associate an elastic IP address (EIP) with the instance after the instance is created. For more information, see Create an IPv4 VPC.
To provide Internet connectivity to an instance that resides in the classic network, you can assign a public IP address and purchase public bandwidth during the creation of the instance, or modify the public bandwidth configurations after the instance is created. For more information, see Modify the bandwidth configurations of subscription instances or Modify the bandwidth configurations of pay-as-you-go instances.
Rules are added to the security group to which the instance belongs to allow access to the corresponding ports. For more information, see Add a security group rule.
Network type
Rule direction
Action
Port range
Priority
Authorization object
VPC
Inbound
Allow
SSH(22)
1
The public IP address of your on-premises client, not the public IP address of the instance.
ImportantYou can also specify 0.0.0.0/0 as the authorization object to allow inbound access from all IP addresses. However, this imposes security risks. Proceed with caution.
Classic network
Internet ingress
Background information
You can use one of the following methods to connect to a Linux instance based on the operating system of your mobile device:
Use iTerminal on an iOS mobile device to connect to a Linux instance
In this example, a username and a password are used for authentication.
Download iTerminal.
Start iTerminal.
In the upper part of the page, tap SSH.
Configure the following parameters and tap Connect:
Nickname: Enter a name for the session. In this example, DocTest is entered.
Host Name or IP Address: Enter the public IP address or elastic IP address (EIP) of the Linux instance to which you want to connect.
Port: Enter the port number 22.
User Name: Enter the username that you selected when you created the Linux instance. Example: root or ecs-user.
Password: Enter the logon password of the Linux instance.
The page shown in the following figure indicates that you are connected to the Linux instance.
Use JuiceSSH on an Android device to connect to a Linux instance
In this example, a username and a password are used for authentication.
Install JuiceSSH.
Start JuiceSSH.
Tap Quick Connect.
Tap the
icon.
Configure the following parameters and tap the
icon:
Nickname: Enter a name for the session. In this example, DocTest is entered.
Type: Use the default value SSH.
Address: Enter the public IP address or EIP of the Linux instance to which you want to connect.
Perform the following steps to configure the Identity parameter:
Tap Identity and select New from the drop-down list.
Configure the following parameters and tap the
icon:
Nickname: optional. You can enter an identity name to facilitate subsequent management. In this example, DocTest is entered.
Username: Enter the username that you selected when you created the Linux instance. Example: root or ecs-user.
Password: Tap UPDATE/CLEAR and enter the logon password of the Linux instance.
Port: Enter the port number 22.
Confirm the prompt and tap ACCEPT.
Optional:The first time you connect to the Linux instance, you are prompted to enter information such as the font size. Confirm the information and tap OK - I'VE GOT IT!.
The page shown in the following figure indicates that you are connected to the Linux instance.