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

  • A Linux instance is created.
  • A logon password is set for the instance.
  • A public IP address or an elastic IP address (EIP) is associated with the instance.
  • The Linux instance to which you want to connect is in the Running state.
  • 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 typeNetwork interface controller (NIC) typeRule directionActionProtocol typePort rangePriorityAuthorization typeAuthorization object
    Virtual Private Cloud (VPC)N/AInboundAllowSSH (22)22/221IPv4 CIDR blocks0.0.0.0/0
    Classic networkPublic

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.

  1. Download iTerminal.
  2. Start iTerminal.
  3. In the upper part of the page, tap SSH. SSH
  4. 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.
    Connect to a Linux instance from an iOS device - 003
    The page shown in the following figure indicates that you are connected to the Linux instance. Connect to a Linux instance from an iOS device - 014

Use JuiceSSH on an Android device to connect to a Linux instance

In this example, a username and a password are used for authentication.

  1. Install JuiceSSH.
  2. Start JuiceSSH.
  3. Tap Quick Connect.
  4. Tap the + icon.
  5. 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:
      1. Tap Identity and select New from the drop-down list.
      2. 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.
  6. Confirm the prompt and tap ACCEPT.
  7. 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.