When you use SSH to log in to a Linux instance, the SSH command gets stuck after outputting the "Last login: " information.
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.
Run the following command to view the
Check whether the
/etc/profile file contains commands related to
#before the relevant commands in
/etc/profileto comment them.