This topic describes how to use a username and password to connect to a Linux instance from an iOS or Android mobile device.

Prerequisites

  • You have created an instance.
  • You have set a logon password for the instance.
  • You have allocated a public IP address or an Elastic IP (EIP) address to the instance.
  • The instance is in the Running state.
  • You have added security group rules to the security group to which the instance belongs to allow access over the corresponding port. For more information, see Add security group rules.
    Network type NIC type Direction Authorization policy Protocol type Port range Priority Authorization type Authorization object
    VPC N/A Inbound Allow SSH (22) 22/22 1 IPv4 CIDR block 0.0.0.0/0
    Classic network Internet

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 SSH Control Lite to connect to a Linux instance from an iOS device

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

  1. Download SSH Control Lite.
  2. Start SSH Control Lite.
  3. In the lower part of the page, tap Hosts.
  4. In the upper-left corner of the page, tap the + icon.
    Connect to a Linux instance from an iOS device - 001
  5. Tap Connection.
    Connect to a Linux instance from an iOS device - 002
  6. Configure the connection parameters and tap Save.
    • Name: Specify the host name. In this example, DocTest is used.
    • Protocol: Use the default value SSH.
    • Host: Specify the public IP address or EIP of the Linux instance to which you want to connect.
    • Port: Enter the port number 22.
    • Username: Enter the username root.
    • Password: Enter the password to log on to the instance.
    Connect to a Linux instance from an iOS device - 003
  7. In the lower part of the page, tap Remote Controls.
    Connect to a Linux instance from an iOS device - 004
  8. In the upper-left corner of the page, tap the + icon.
    Create a remote connection session. In this example, the session name is specified as New remote.Connect to a Linux instance from an iOS device - 005
  9. Tap Host1.
    Connect to a Linux instance from an iOS device - 006
  10. Tap Bind.
    Connect to a Linux instance from an iOS device - 007
  11. Select the newly added Linux instance.
    In this example, DocTest is used.Connect to a Linux instance from an iOS device - 008
  12. In the upper-right corner of the page, tap Done. When Edit is displayed in the upper-right corner of the page, tap DocTest.
    Connect to a Linux instance from an iOS device - 009
  13. Tap Connect.
    Connect to a Linux instance from an iOS device - 010
  14. Select Yes, Once or Yes, Permanently.
    If the connection is successful, the indicator icon next to DocTest becomes green.Connect to a Linux instance from an iOS device - 011
  15. Tap DocTest.
    Connect to a Linux instance from an iOS device - 012
  16. Tap Console to go to the Linux instance management page.
    Connect to a Linux instance from an iOS device - 013
You have connected to the Linux instance.Connect to a Linux instance from an iOS device - 014

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

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

  1. Install JuiceSSH.
  2. Start JuiceSSH.
  3. Tap Connections.
  4. Tap the + icon.
  5. Configure the connection parameters and tap the icon.
    • Nickname: Specify the session name. In this example, DocTest is used.
    • Type: Use the default value SSH.
    • Address: Specify the public IP address or EIP of the Linux instance to which you want to connect.
    • Set Identity.
      1. Tap Identity and select New from the drop-down list.
      2. Specify the following parameters and tap the icon.
        • NickName: optional. You can specify an identity name based on your management needs. In this example, DocTest is used.
        • Username: Enter the username root.
        • Password: Tap SET(OPTIONAL) and enter the password to log on to the instance.
    • Port: Enter the port number 22.
  6. Read the prompt and tap ACCEPT.
  7. Optional:When you connect to the instance for the first time, a message appears to remind you to set information such as font. Read the information and tap OK - I'VE GOT IT!.
You have connected to the Linux instance.