tencent cloud


Infinite Loop Call in /etc/profile

Last updated: 2022-03-30 15:44:14

    Issue Description

    When you use SSH to log in to a Linux instance, the SSH command gets stuck after outputting the "Last login: " information.

    Common Causes

    This problem is probably because the /etc/profile file was modified, so /etc/profile was called in /etc/profile, resulting in an infinite loop call and inability to log in successfully.


    Check and repair the /etc/profile file as instructed in Steps.


    1. Log in to the Linux instance via VNC.

    2. Run the following command to view the /etc/profile file.

      vim  /etc/profile
    3. Check whether the /etc/profile file contains commands related to /etc/profile.

    1. Press i to enter the edit mode and add # before the relevant commands in /etc/profile to comment them.
    2. Press Esc to exit the edit mode, and enter :wq to save the modification.
    3. Log in to the Linux instance again by using SSH.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support