All Products
Search
Document Center

Simple Application Server:Connect to a Linux server

Last Updated:Jun 27, 2025

You can connect to a Linux server remotely by using Workbench, third-party clients such as PuTTY, or SSH commands. This topic describes how to connect to a Linux server.

Prerequisites

Method 1: Use Workbench to connect (recommended)

Workbench is a browser-based remote connection tool that allows direct server access without the need for additional software. For more information about Workbench, see Basic operations in Workbench.

  1. Go to the Servers page in the Simple Application Server console.

  2. Click Remote Connection in server card. In the Remote Connection dialog box, select a connection method.

    One-click logon using Workbench

    In the Connect with One-click on Workbench section, click Log on Now to connect to the server as admin user. You do not need to enter a username or password.

    image

    Password-based logons on Workbench

    Find Password-based Logons on Workbench under Log on by Using Other Methods. Click Log on Now, and then enter the password of root to connect.

    image

Method 2: Use PuTTY to connect from Windows

Connect by using a password

  1. Download and install PuTTY on your Windows device.

  2. Start PuTTY and configure the information.

    The following table describes the parameters. Use the default values for other parameters.

    Parameter

    Description

    Host Name(or IP address)

    Enter the logon account and public IP address of the server. Format: Username@Public IP Address. Example: root@121.40.XX.XX.

    Port

    22.

    Connection type

    Select SSH.

    Saved Sessions

    Enter a name to identify, such as "test". Then, click Save to save the session. You do not need to enter them again on your next logon.

    putty configuration

  3. Click Open. In the command line, enter Linux system user root. Then press the Enter key.

  4. In the command line, enter the logon password of the Linux server. Then press Enter.

    Note

    For data security, no output is displayed. You only need to enter the correct password and press Enter.

    Your logon is successful if following information is displayed.login

Connect by using a key pair

  1. You have bound a key pair to the server. For more information, see Create or import a key pair.

    Important

    After you create a key pair, you need to restart the server to allow the key pair to take effect.

  2. Download and install PuTTYgen and PuTTY.

  3. Convert the .pem private key file to the .ppk private key file.

    You need convert the key file from the .pem format to the .ppk format, if the key file is in .pem format from Alibaba Cloud. Then you can use PuTTY to connect to the server. Perform the following steps:

    1. Open PuTTYgen. In the Actions section, click Load.puttygen

    2. In the lower part of the Load private key dialog box, select All Files(*.*) to view files of all formats.All Files

    3. In the PuTTYgen Notice dialog box, find and select the private key file in the .pem format, then click Yes.

    4. In Parameters section, click RSA.

    5. In Actions section, click Save private key, then click Yes(Y).

      Specify a name and a path for the private key file in the .ppk format.

  4. Configure the information for connection.

    The following table describes the parameters. Use the default values for other parameters.

    Parameter

    Description

    Host Name(or IP address)

    Enter the logon account and public IP address of the server. Format: Username@Public IP Address. Example: root@121.40.XX.XX.

    Port

    22.

    Connection type

    Select SSH.

    Saved Sessions

    Enter a name to identify, such as "test". Then, click Save to save the session. You do not need to enter them again on your next logon.

    putty configuration

  5. Configure the private key file for authentication.

    1. In the left-side navigation pane, choose Connection > SSH > Auth > Credentials.

    2. In the Private key file for authentication section, click Browse….

    3. Select the key file in the .ppk format, and click Open.image..png

  6. Click Open.

    Your logon is successful if following information is displayed.

    login

Method 3: Use SSH commands to connect from Linux or macOS

Connect using a password

  1. Connect to the Linux server.

    ssh root@<Public IP address of the Linux server>

    Example:

    ssh root@121.40.XX.XX
  2. Enter yes and press Enter.

    At the first-time connection, the system cannot verify the authenticity of the remote server. So the system provides only the public key fingerprint of the server, and ask you whether to continue with the connection. Enter yes to indicate that your trust.

  3. Enter the logon password of the Linux server and press Enter.

    Note

    For data security purposes, no output is returned when you enter a password. You need only to enter the correct password and then press the Enter key.

Connect using a key pair

  1. You have bound a key pair to the server. For more information, see Create or import a key pair.

    Important

    After you create a key pair, you need to restart the server to allow the key pair to take effect.

  2. Find the private key file stored on your device.

    In this example, it is /test/XXX.pem.

  3. Modify permissions on the private key file.

    Replace /test/XXX.pem with the actual path of the key file.

    chmod 400 /test/XXX.pem
  4. Connect to the Linux server.

    Replace <Public IP address of the Linux server> and /test/XXX.pem with the actual information.

    ssh root@<Public IP address of the Linux server> -i /test/XXX.pem

    If you see the following information, run ssh -o PubkeyAcceptedKeyTypes=+ssh-rsa root@<Public IP address of the Linux server> -i /test/XXX.pem.

    sign_and_send_pubkey: no mutual signature supported root@47.110.XX.XX: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)  

Method 4: Use rescue logon to connect

When you cannot connect to a server using Workbench or third-party remote connection tools such as PuTTY, Xshell, or SecureCRT, you can use the rescue logon (VNC) to connect to the server for troubleshooting.

Note

A rescue connection session lasts for about 300 seconds by default. If you do not perform any operations more than 300 seconds, the connection automatically closes and displays a blank screen. In this case, you need to close the current rescue connection page and reconnect using the rescue feature.

  1. Go to the Servers page in the Simple Application Server console.

  2. In the server card, click Connect.

  3. In the Connect dialog box, in the Rescue Logon section, click Log on Now.

    You will be directed to the rescue logon page. If you are not directed to this page, check whether your browser is blocking pop-up dialogs.

    image

  4. Enter the logon user (such as root) and press Enter.

  5. Enter the logon password and press Enter.

    Note
    • For security issues, the characters of the password are hidden. Make sure that you enter the correct password.

    • If you need to copy a long text from your device to the server, such as a file download URL, you can click Copy Command in the upper-right corner of the rescue page, and paste the command in the pop-up dialog box.

    Your logon is successful if following information is displayed.

    image

FAQ

Q1: I used a key pair to logon previously. How can I use a password to log on?

A: After you create a key pair and restart the server for the new key pair, root account is disable to logon by the server. To re-enable password logon, do the following steps:

  • If you want to log on with a new password, you can directly reset the password. For more information, see Set or reset the password of a server.

  • If you want to log on with the old password, you need to modify the configuration file of the server.

    1. Use Workbench to connect to the server. For more information, see One-click logon using Workbench.

    2. Open the /etc/ssh/sshd_config file.

      sudo vim /etc/ssh/sshd_config
    3. Press i to enter the edit mode. At the end of the file, change PasswordAuthentication no to PasswordAuthentication yes.

      After the change, the configuration is as follows.配置文件

    4. Press Esc to exit the edit mode. Then, enter :wq and press Enter to save and close.

    5. Restart the SSH service.

      sudo service sshd restart

      After SSH is restarted, you can use the root account and the corresponding password to connect.

      Important

      Make sure that you enter the correct password when using it.

Q2: Why can't I connect to a server by using the rescue logon?

A: The server system may be stuck due to high vCPU utilization and high memory usage. We recommend that you restart the simple application server during off-peak hours and try again.

For information about how to troubleshoot problem such as a timeout or failure, see FAQ about remote connection. If the issue persists, you can submit a ticket for technical support.

References