Instance connection FAQ

更新时间:
复制 MD 格式

SSH remote connection issues

SSH service startup issues and solutions

Other common issues and solutions

Remote Desktop (RDP) connection issues

VNC remote connection issues

Troubleshooting remote connection issues using VNC

FTP service connection issues

Windows instances

Linux instances

Appendix

Sshd startup error: Permission for /usr/share/empty.sshd

  • Symptom

    The sshd service on an ECS instance fails to start, and the system log reports a permission error: /usr/share/empty.sshd must be owned by root and not group or world-writable

  • Cause

    The sshd service fails to start because the /usr/share/empty.sshd file has incorrect permissions.

  • Solution

    chown -R root.root /usr/share/empty.sshd
    chmod 744 /usr/share/empty.sshd
    systemctl start sshd
    ll -ld /usr/share/empty*

Troubleshooting internet FTP connections on Windows

Symptom

An FTP service on a Windows ECS instance is unreachable from the internet.

Cause

Possible causes include:

Solution

Choose a solution based on the cause.

Solution 1: Add security group rules for FTP

After you set up an FTP site on an ECS instance that runs Windows, you must add an inbound rule to the security group of the instance to allow traffic on port 21 for the FTP server and on the port range 1024-65535 for passive mode. For more information, see Add a security group rule.

Note

For more information about security group configurations, see Security group application guide and use cases and Common ports.

Solution 2: Configure FTP firewall support

If the firewall is enabled, you must configure IIS Manager to allow FTP traffic on TCP port 21 and the port range 1024-65535. Follow these steps:

Note
  • The internal firewall of a Windows ECS instance is disabled by default.

  • This topic uses IIS Manager as an example to describe how to configure FTP.

  1. Connect to the Windows instance.

    For more information, see Connect to a Windows instance by using a password or key.

  2. Open IIS Manager and double-click FTP Firewall Support to open its configuration page.

  3. Set the parameters and click Apply.

    Note

    Parameters:

    • External IP Address of Firewall: Enter the public IP address of the Windows ECS instance.

    • Data Channel Port Range: Specify the port range for passive connections. The valid port range is 1024-65535. This topic uses 1024-65535 as an example.

  4. Open the command line and run the following command to restart the FTP service. This applies the new configuration to all FTP sites.

    net stop ftpsvc&net start ftpsvc
  5. (Optional) If the FTP server is locally accessible but unreachable from other machines after configuration, the firewall might be misconfigured. Follow these steps to correctly configure the firewall:

    1. Check the inbound rules in Server Manager to make sure that the FTP server is enabled.

    2. Add the Windows service host process.

      1. Navigate to Control Panel > Windows Firewall and click Allow an App or Feature Through Windows Firewall in the left-side navigation pane.

      2. In the new window, click Allow Another App..., browse to and select C:\Windows\System32\svchost.exe to add the service host process.

      3. Select the new Windows Service Host Process item, select the Private and Public checkboxes, and then click OK.

Troubleshooting FTP error "530 Login incorrect"

Symptom

When you connect to the FTP server on an ECS instance that runs Windows, the following error is reported:

Response: 331 Please specify the password.
Command: PASS ************
Response: 530 Login incorrect.
Error: Critical error: Could not connect to server
Cause

Possible causes include:

Solution

Choose a solution based on the cause.

Solution 1: Change the FTP password

  1. Connect to the Windows instance.

    For more information, see Connect to a Windows instance by using a password or key.

  2. On the desktop, right-click Computer > Manage to open Server Manager.

  3. In the left-side navigation pane, click Local Users and Groups > Users. Right-click the FTP account and select Set Password.

Solution 2: Add FTP user permissions

  1. Connect to the Windows instance.

    For more information, see Connect to a Windows instance by using a password or key.

  2. Check whether the FTP user directory exists.

    1. If the directory does not exist, re-create it and add the required permissions. For more information, see Step 3: Set permissions for shared files.

    2. If the directory exists, right-click the folder and select Properties > Security. Select the FTP account and grant the required permissions.

Troubleshooting FTP error "530 valid hostname is expected"

Symptom

When connecting to an FTP server on a Windows ECS instance by IP address, a "530 valid hostname is expected" or "503 Login with USER first" error occurs if the FTP site, configured in IIS 7.5, is bound to a domain name.

Cause

This error occurs because the username format is incorrect when you log on to an FTP service that is bound to a domain name in IIS 7.5.

Solution

If the domain name bound to the FTP service is www.example.com and the username is user, you must use www.example.com|user to log on.

Note
  • The separator is a pipe character (|).

  • Alternatively, remove the domain name binding and log on with only the username.

Troubleshooting FileZilla error "550 Permission denied"

Symptom

A "550 Permission denied" error is reported when you upload a file to FileZilla Server by using FTP on an ECS instance that runs Windows.

Cause

The corresponding FTP account in FileZilla Server does not have the write permission.

Solution
  1. Connect to the Windows instance.

    For more information, see Connect to a Windows instance by using a password or key.

  2. Run the FileZilla Server software. On the Users page, select Shared folders.

  3. Select the corresponding user and directory, select the Write checkbox, and then click OK to grant the permission.

FTP over TLS error: "534 Policy requires SSL"

Symptom

When you connect to an FTP site created by the IIS service on a Windows instance by using FTP over TLS, the message "534 Policy requires SSL" is displayed, preventing the connection.

Cause

The "534 Local policy on server does not allow TLS secure connections." response indicates that the FTP SSL Settings parameter of the FTP site is not correctly configured.

Solution
  1. Connect to the Windows instance.

    For more information, see Connection methods.

  2. In the lower-left corner of the desktop, choose 开始图标 > Windows Administrative Tools > Internet Information Services (IIS) Manager.

  3. On the FTP homepage, in the FTP section, double-click FTP SSL Settings.

  4. In the FTP SSL Settings section, set SSL Policy to Allow SSL connections, and then click Apply in the Actions pane.

  5. Access the FTP site again.

Troubleshooting FTP error "425 Security:Bad IP connection"

Symptom

A "425 Security:Bad IP connection" error is reported when a user uploads a file to an FTP site on an ECS instance that runs Linux.

Cause

This issue usually occurs because the client is in a NAT network that is associated with more than one public IP address. As a result, the source IP addresses for the control and data connections are inconsistent, causing the error.

Note

The FTP service uses a control connection and a data connection. By default, the FTP server verifies that the two connections have the same source IP address during data transfer. If the source IP addresses are different, a "425 Security:Bad IP connection" error is reported.

Solution

Perform the following steps to disable the IP security check in passive mode:

  1. Connect to the Linux instance.

    For more information, see Connect to a Linux instance by using a password or key.

  2. Run the following command to edit the FTP configuration file:

    vi /etc/vsftpd/vsftpd.conf
  3. Press i to enter edit mode and add the following content to the configuration file:

    pasv_promiscuous=yes
  4. Press Esc to exit edit mode, enter :wq, and then press Enter to save and exit.

  5. Run the following command to restart the FTP service:

    systemctl restart vsftpd

Troubleshooting vsftp error "553 Could not create file"

Symptom

Uploading a file to an ECS instance that runs Linux by using vsftp fails with a "553 Could not create file" error.

Cause

Possible causes include:

  • The disk space of the Linux instance is full.

  • The FTP home directory does not have the write permission.

Solution

Follow these steps to check the instance's disk space and the FTP home directory permissions:

  1. Connect to the Linux instance.

    For more information, see Connect to a Linux instance by using a password or key.

  2. Run the following command to check whether the disk is full.

    df -h
    Note

    If a partition's disk space usage reaches 100%, it is full.

    A similar output is displayed. For example, the space usage of the /dev/xvda1 partition is 59%.

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/xvda1       20G   11G  7.8G  59% /
    tmpfs           498M  1.6M  496M   1% /dev/shm
  3. Run the following command to check whether the FTP home directory has the write permission.

    Note

    Before you run the following command, replace /home/user with your actual FTP home directory name.

    ls -l /home/user

    If the permission string in the output does not include w, you do not have the write permission. For example:

    dr-xr-xr-x  4 xxx              xxx            4096 May 10 21:47 zhengbo
  4. Run the following command to add the write permission:

    chmod +w /home/user
  5. Run the following command to verify the permission. If the command output contains w, the write permission is added.

    ls -l /home/user

Alibaba Cloud Linux: Configure account lockout

The Alibaba Cloud Linux 3.2104 operating system uses authselect to automatically manage pam.d. As a result, manual modifications to pam.d parameters do not take effect. Instead, use the following method:

  1. Run the following command to check whether the current profile is local or sssd. The default is sssd.

    sudo authselect current
  2. Configure faillock.

    sudo authselect select sssd with-faillock --force
  3. Modify the /etc/security/faillock.conf file. For example, to lock an account (including root) for 60 seconds after three failed logon attempts, configure these three parameters:

    deny = 3
    unlock_time = 60
    even_deny_root