내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
해결됨

Past Active login sessions in AEM Dispatcher

Avatar

Level 3

Hello All,

Good Day!


I was trying to login into the AEM Dispatcher instance from 2 Git-bash windows (We use to clear the cache from one window and check the status of the cache clearance from other window). But I was not able to login via 2 windows. I was getting below mentioned error.

Error :- "Too many logins for '{username}'."


Upon checking the logged in users via 'w' command I found following information.

{username}@AV*****ryd**onc**-p****1-dispatcher1u***1-*********14:~ w
12:39:24 up 38 days, 22:50, 4 users, load average: 0.41, 0.69, 0.81
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
aru***g pts/1 103.43.112.97 19Feb25 0.00s 0.00s 0.88s sudo su -
n***h.* pts/3 10.12.54.15 12:25 1.00s 0.02s 0.01s w
n***h.* pts/4 10.12.54.15 Tue07 0.00s 0.00s 0.00s sudo /bin/rm -rf /mnt/var/www/html/bin /mnt/var/www/html/content /mnt/var/www/html/etc.clientlibs /mnt/var/www/html
n***h.* pts/5 10.12.54.15 Tue07 0.00s 0.00s 0.01s sudo /bin/systemctl status httpd

It seems some past login sessions are somehow still open. how to get close the past active sessions.

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi @Nitesh-Chavan ,

The error message "Too many logins for '{username}'" suggests that multiple past sessions might still be active, preventing you from logging in again. To resolve this, you can manually terminate these lingering sessions.

Steps to Close Active Sessions:

1. Check Active Sessions

Run the following command to list active sessions: w or who (This will display all logged-in users and their session details)

2. Kill a Specific Session

If you identify a session (e.g., pts/1) that needs to be closed, you can terminate it using:

sudo pkill -t pts/1 (This will close the session for pts/1)

3. Kill All Sessions for a User

If you want to log out a specific user entirely, use: sudo pkill -u {username} (Replace {username} with the actual username to terminate all active sessions for that user)

4. Manually Kill Processes (If Needed)

If pkill does not work, you can manually find and terminate processes associated with a session:

Find the process ID (PID) for a session (e.g., pts/4): ps -t pts/4


Example Output:

PID TTY          TIME CMD
12345 pts/4    00:00:00 bash

Kill the process forcefully: kill -9 12345


Preventing This Issue in the Future

Always exit sessions properly using exit or logout.

Set up automatic session timeout by editing /etc/ssh/sshd_config:

ClientAliveInterval 300
ClientAliveCountMax 0

Then restart SSH: sudo systemctl restart sshd


Regards,
Amit

원본 게시물의 솔루션 보기

3 답변 개

Avatar

Level 10

You can terminate a specific session using the pkill command followed by the session ID. For example, if you want to close the session with ID pts/1:

sudo pkill -t pts/1

This command will terminate all processes associated with the terminal pts/1.

 

If you want to close all sessions for a specific user, you can use the following command:

sudo pkill -u username

Replace username with the actual username. 

If pkill is not available you can use kill command:

#Use the ps command to find the PID associated with the TTY
ps -t pts/4

Example output:
  PID TTY          TIME CMD
12345 pts/4    00:00:00 bash

#Use the kill command to terminate the process
kill -9 12345

Avatar

정확한 답변 작성자:
Community Advisor

Hi @Nitesh-Chavan ,

The error message "Too many logins for '{username}'" suggests that multiple past sessions might still be active, preventing you from logging in again. To resolve this, you can manually terminate these lingering sessions.

Steps to Close Active Sessions:

1. Check Active Sessions

Run the following command to list active sessions: w or who (This will display all logged-in users and their session details)

2. Kill a Specific Session

If you identify a session (e.g., pts/1) that needs to be closed, you can terminate it using:

sudo pkill -t pts/1 (This will close the session for pts/1)

3. Kill All Sessions for a User

If you want to log out a specific user entirely, use: sudo pkill -u {username} (Replace {username} with the actual username to terminate all active sessions for that user)

4. Manually Kill Processes (If Needed)

If pkill does not work, you can manually find and terminate processes associated with a session:

Find the process ID (PID) for a session (e.g., pts/4): ps -t pts/4


Example Output:

PID TTY          TIME CMD
12345 pts/4    00:00:00 bash

Kill the process forcefully: kill -9 12345


Preventing This Issue in the Future

Always exit sessions properly using exit or logout.

Set up automatic session timeout by editing /etc/ssh/sshd_config:

ClientAliveInterval 300
ClientAliveCountMax 0

Then restart SSH: sudo systemctl restart sshd


Regards,
Amit

Avatar

Administrator

@Nitesh-Chavan Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni