From ae6417c39d6934d92cbc164824cde069989d4478 Mon Sep 17 00:00:00 2001 From: steering7253 Date: Fri, 10 Apr 2026 21:01:02 +0000 Subject: add ip to login notifications --- autopeer_shell.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autopeer_shell.py') diff --git a/autopeer_shell.py b/autopeer_shell.py index 1e13b71..1d77d43 100755 --- a/autopeer_shell.py +++ b/autopeer_shell.py @@ -223,8 +223,8 @@ if __name__ == '__main__': shell = AutopeerShell() command = os.getenv('SSH_ORIGINAL_COMMAND', '') if len(command): - sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} ran {command}", text=True) + sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} ran {command} via {os.getenv('SSH_CONNECTION')}", text=True) shell.onecmd(command) else: - sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} logged in", text=True) + sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} logged in via {os.getenv('SSH_CONNECTION')}", text=True) shell.cmdloop() -- cgit v1.3.1-10-gc9f91