{"id":24767060,"url":"https://github.com/xpyctiks/loginnotify","last_synced_at":"2026-04-08T11:32:21.848Z","repository":{"id":208698291,"uuid":"523855505","full_name":"Xpyctiks/loginNotify","owner":"Xpyctiks","description":"This is a bash script which sends all successfull SSH log-ins to your server via Telegram bot.Allows to monitor all connections and where are they made from. Also it using local MySQL DB for whitelist IPs.","archived":false,"fork":false,"pushed_at":"2024-11-01T12:30:35.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T16:23:37.023Z","etag":null,"topics":["database","login","logout","mysql","pam","pam-authentication","pam-module","ssh","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xpyctiks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-11T20:11:09.000Z","updated_at":"2024-11-01T12:30:39.000Z","dependencies_parsed_at":"2023-12-10T11:22:55.602Z","dependency_job_id":"2eb0db35-b841-4073-b26c-ab7c9e76a20c","html_url":"https://github.com/Xpyctiks/loginNotify","commit_stats":null,"previous_names":["xpyctiks/loginnotify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Xpyctiks/loginNotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xpyctiks%2FloginNotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xpyctiks%2FloginNotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xpyctiks%2FloginNotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xpyctiks%2FloginNotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xpyctiks","download_url":"https://codeload.github.com/Xpyctiks/loginNotify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xpyctiks%2FloginNotify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31554091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","login","logout","mysql","pam","pam-authentication","pam-module","ssh","telegram","telegram-bot"],"created_at":"2025-01-29T00:43:01.019Z","updated_at":"2026-04-08T11:32:21.815Z","avatar_url":"https://github.com/Xpyctiks.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loginNotify\nThis is a bash script which sends all successfull SSH log-ins to your server\nvia Telegram bot.Allows to monitor all connections and where are they made from.\nAlso it using local MySQL DB for whitelist IPs.Using this DB allow to change a \ntype of login message - simple view if it's familiar IP + comment from DB to this\nIP - usefull to understand who is connecting.\nIf there is connection from unknown IP (it doesn't exist in DB) - the login message\nhas another view, and consists info about country and provider of that IP.\n\nRequires curl and whois on the server.\n\nInstallation:\n- Just download the script to any folder. For example, on Debian-based OS it could be /usr/local/bin/ folder.\n- Launch DB init for the first time:\n  login-notify initDB \u003cmysql_root_pwd\u003e \u003cdb_name\u003e \u003cdb_user\u003e \u003cdb_pwd\u003e\n    \u003cmysql_root_pwd\u003e - password of mysql root account to create everything we need. Type \"-\" if not need to use pwd for root access to mysql\n    \u003cdb_name\u003e - The name of DB you want to create\n    \u003cdb_user\u003e - user of the new DB\n    \u003cdb_pwd\u003e - password you want to set for new DB\n- Then you need to edit this script end set the next variables at the top of script:\n    dbName=\"\"\n    dbUser=\"\"\n    tdbPass=\"\"\n- Then dont't foreget to fill in $token and $chat variables in there. Telegram bot requires them very much.\n- Finally, add to the end of /etc/pam.d/sshd next string: \"session optional pam_exec.so \u003cpath_to_this_script\u003e/\u003cthis_script_name\u003e\"\n\nAdding IP address:\n- You can add new IP address with a comment using any mysql clients, cli, etc. Or use internal function of this script:\n  ./\u003cthis_script_name\u003e addIP \u003cIP\u003e \u003cComment\u003e\n  \u003cIP\u003e - an IP address to be added\n  \u003cComment\u003e - comment for IP. Should be not large.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpyctiks%2Floginnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxpyctiks%2Floginnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxpyctiks%2Floginnotify/lists"}