You can connect to a Linux server using a browser, an SSH client, or a rescue connection.
|
Connection method |
Best for |
|
Workbench (Recommended) |
Quickly and easily connect to your server from a browser, with no client installation required. |
|
SSH client |
Frequent or long-duration connections that use key pair authentication. |
|
rescue connection |
Emergency troubleshooting when the server's SSH service is not working or remote connections fail. |
Method 1: Connect using Workbench (Recommended)
-
Log on to the Simple Application Server console.
-
In the server list, find your server's card and click Connect.
-
In the dialog box that appears, choose one of the following logon methods.
Workbench one-click logon
In the Connect with One-click on Workbench section, click Log on Now.
Workbench password logon
Click Log on by Using Other Methods. In the Password-based Logons on Workbench section, click Log on Now, and then enter the password for the
rootuser.ImportantThe server has no default password. Before your first logon, you must set a password for the server.
Method 2: Connect using an SSH client
Before you begin
-
Obtain the server's public IP address by logging on to the Simple Application Server console and finding the public IP Address on the server card.
-
Prepare your logon credentials by choosing one of the following methods:
-
Password logon: The server has no default password. Before logging in for the first time, you must set a password for the server.
-
Key pair logon: You must first attach a key pair to the instance.
-
Password logon
Windows
-
Open PuTTY and configure the session.
Parameter
Description
Host name (or IP address)
Enter root@<public-ip-address>. Example:
root@121.40.XX.XX.Port
Enter 22.
Saved sessions
Enter a name for the session, such as My-Server, and then click Save to store the configuration for quick logons.
-
Click Open, enter the server's password in the command-line window, and press
Enter.For security, the command line does not display characters as you enter the password.
macOS or Linux
-
Open the terminal on your local Linux or macOS computer.
-
Run the following command. Replace
<public-ip-address>with your server's public IP address.ssh root@<public-ip-address> -
If this is your first time connecting, enter
yesand pressEnterto trust the server. -
Enter the server's logon password and press
Enter.For security, the command line does not display characters as you enter the password.
Key pair logon
Windows
-
Use PuTTYgen to convert your
.pemprivate key to the.ppkformat.-
Open PuTTYgen and click Load.
-
Select All Files (*.*), find and load the
.pemprivate key file. In the dialog box that appears, click OK. -
Click Save private key. In the dialog box that appears, click Yes.
-
Enter a new File name and save the converted private key as a
.ppkfile.
-
-
Open PuTTY and configure the session.
Parameter
Description
Host name (or IP address)
Enter root@<public-ip-address>. Example:
root@121.40.XX.XX.Port
Enter 22.
Saved sessions
Enter a name for the session, such as My-Server, and then click Save to store the configuration for quick logons.
-
Configure the private key for authentication.
-
In the left-side navigation pane, choose Connection > SSH > Auth > Credentials.
-
In the Private key file for authentication: section, click Browse.
-
Select your saved
.ppkprivate key file and click Open. The path to the selected.ppkfile (for example,xd-p.ppk) appears in the Private key file for authentication field.
-
-
Click Open to log on.
macOS or Linux
-
Locate the
.pemprivate key file on your local computer. -
Change the private key file's permissions.
Replace
/path/to/your/key.pemwith the file's actual path.chmod 400 /path/to/your/key.pem -
Run the following command to connect to the server using the private key.
Replace
<public-ip-address>with your server's public IP address and/path/to/your/key.pemwith the path to your private key file.ssh root@<public-ip-address> -i /path/to/your/key.pemIf the connection fails with the error
no mutual signature supported, run the following command:ssh -o PubkeyAcceptedKeyTypes=+ssh-rsa root@<public-ip-address> -i /path/to/your/key.pem
Method 3: Connect using a rescue connection
Use this method for emergency troubleshooting when conventional methods such as Workbench or SSH are unavailable.
A rescue connection session times out after about 300 seconds of inactivity. If the connection drops, you must reconnect.
-
Log on to the Simple Application Server console.
-
On the server card, click Connect. In the dialog box that appears, click Log on by Using Other Methods.
-
In the Rescue Logon section, click Log on Now.
You are automatically redirected to the rescue logon page. If not, ensure your browser is not blocking pop-up windows.
-
On the VNC logon page, enter the username
rootand pressEnter. -
Enter the server's password and press
Enter.For security, the command line does not display characters as you enter the password.
The following output indicates a successful logon.
Alibaba Cloud Linux 3 (Soaring Falcon) Kernel 5.10.134-16.3.al8.x86_64 on an x86_64 iZbp1eixuzhxxx uf j7Z login: root Password: Last login: Mon Aug 26 17:01:39 from 100.xxx.2 Welcome to Alibaba Cloud Elastic Compute Service ! Updates Information Summary: available 33 Security notice(s) 7 Important Security notice(s) 20 Moderate Security notice(s) 6 Low Security notice(s) Run "dnf upgrade-minimal --security" to apply all updates.More details please refer to: https://www.alibabacloud.com/help/document_detail/416274.html [root@iZbp1exxx uf j7Z ~]#Use the Copy Command feature in the upper-right corner of the page to paste long text, such as commands or URLs, from your local device.
FAQ
For more information about remote connection issues, such as connection timeouts or failures, see Remote connection FAQ.
Related topics
-
Use Alibaba Cloud Client to connect to a server
You can install Alibaba Cloud Client on your local computer to connect to your servers.
-
Set a custom port to connect to a server
The default remote connection port for a Linux server is
22. You can change this port to improve system security.