[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75MEZXWWY7M8PBJD501VKZ4":3,"skill-same:01M75MEZXWWY7M8PBJD501VKZ4":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M75MEZXWWY7M8PBJD501VKZ4","batched-ssh-enumeration",null,"Use when a loop or watchdog SSHes across many hosts to probe, enumerate, or act. Force non-interactive SSH with timeouts so one un-authable host cannot hang the loop, and check a heartbeat so a stuck-but-alive process is detected.","selamy-labs\u002Fagent-skills","selamy-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F287832944?v=4","01M75MDKJ0CKAM94KZ7TWQJM5Q","01M75MDKJNP3TATHAW1MX1FWM6",0,"MIT","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fbatched-ssh-enumeration\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: batched-ssh-enumeration\ndescription: Use when a loop or watchdog SSHes across many hosts to probe, enumerate, or act. Force non-interactive SSH with timeouts so one un-authable host cannot hang the loop, and check a heartbeat so a stuck-but-alive process is detected.\n---\n\n# Batched SSH Enumeration\n\nA loop that SSHes to a list of hosts — a fleet probe, a deploy fan-out, a\nshepherd that visits N repos\u002Fnodes — has two failure modes that quietly wedge\nthe whole run. Both are avoidable with a few flags and a heartbeat.\n\n## Failure 1: one host drops to a password prompt and blocks forever\n\nIf key auth fails for **any** host (key rotated, host re-imaged, account\nremoved), OpenSSH falls back to an **interactive password prompt**. In an\nunattended loop there is no human to type, so that one `ssh` call blocks\n**indefinitely**, and every host after it never gets visited. One bad host =\ntotal stall.\n\n**Force non-interactive, bounded SSH on every call:**\n\n```bash\nssh -o BatchMode=yes \\        # never prompt; fail fast if key auth can't work\n    -o ConnectTimeout=10 \\    # cap the TCP\u002Fhandshake wait\n    -o StrictHostKeyChecking=accept-new \\\n    \"$host\" \"$remote_cmd\"\n```\n\n- `BatchMode=yes` turns any prompt (password, passphrase) into an immediate\n  non-zero exit instead of a hang.\n- `ConnectTimeout` bounds connection setup.\n- Wrap the whole call in an **overall** `timeout` too, because a connection that\n  succeeds but then hangs mid-command is not covered by `ConnectTimeout`:\n\n```bash\ntimeout 60 ssh -o BatchMode=yes -o ConnectTimeout=10 \"$host\" \"$remote_cmd\" \\\n  || log \"host $host unreachable\u002Ftimed out — skipping\"\n```\n\nTreat a failed host as **skip-and-continue with a logged warning**, never as a\nreason to block. Isolate each host so one failure cannot take down the sweep.\n\n## Failure 2: the watchdog trusts liveness, not progress\n\nA watchdog that only checks \"is the process \u002F tmux session \u002F pod still up?\" is\nfooled by a **live-but-stuck** worker: the process is running, so liveness is\ngreen, but it has been blocked on one hung SSH call for hours making zero\nprogress. Liveness ≠ progress.\n\n**Watch a heartbeat, not just a pulse.** The worker writes a monotonic\nheartbeat — a timestamp file, a counter, a `last_progress_at` field — every\ntime it actually advances (per host visited, per item done). The watchdog reads\nthat heartbeat and declares the worker **WEDGED** when it is *stale* beyond a\nthreshold, then restarts\u002Falerts:\n\n```bash\nage=$(( $(date +%s) - $(stat -c %Y \"$HEARTBEAT_FILE\") ))\nif (( age > STALE_THRESHOLD )); then\n  alert \"worker WEDGED — heartbeat stale ${age}s\"; restart_worker\nfi\n```\n\nReal incident: a global PR shepherd ran wedged for ~37 hours. The process was\nalive (liveness checks passed) but stuck on a single un-authable host's\ninteractive prompt; no heartbeat check existed to notice it had stopped making\nprogress.\n\n## Checklist\n\n- [ ] Every `ssh` uses `BatchMode=yes` + `ConnectTimeout`.\n- [ ] Every remote call is wrapped in an overall `timeout`.\n- [ ] A failed host is skipped-and-logged, never blocking.\n- [ ] The worker emits a heartbeat on real progress.\n- [ ] The watchdog flags **stale heartbeat** as wedged, not just dead process.\n","# Batched SSH Enumeration\n\nA loop that SSHes to a list of hosts — a fleet probe, a deploy fan-out, a\nshepherd that visits N repos\u002Fnodes — has two failure modes that quietly wedge\nthe whole run. Both are avoidable with a few flags and a heartbeat.\n\n## Failure 1: one host drops to a password prompt and blocks forever\n\nIf key auth fails for **any** host (key rotated, host re-imaged, account\nremoved), OpenSSH falls back to an **interactive password prompt**. In an\nunattended loop there is no human to type, so that one `ssh` call blocks\n**indefinitely**, and every host after it never gets visited. One bad host =\ntotal stall.\n\n**Force non-interactive, bounded SSH on every call:**\n\n```bash\nssh -o BatchMode=yes \\        # never prompt; fail fast if key auth can't work\n    -o ConnectTimeout=10 \\    # cap the TCP\u002Fhandshake wait\n    -o StrictHostKeyChecking=accept-new \\\n    \"$host\" \"$remote_cmd\"\n```\n\n- `BatchMode=yes` turns any prompt (password, passphrase) into an immediate\n  non-zero exit instead of a hang.\n- `ConnectTimeout` bounds connection setup.\n- Wrap the whole call in an **overall** `timeout` too, because a connection that\n  succeeds but then hangs mid-command is not covered by `ConnectTimeout`:\n\n```bash\ntimeout 60 ssh -o BatchMode=yes -o ConnectTimeout=10 \"$host\" \"$remote_cmd\" \\\n  || log \"host $host unreachable\u002Ftimed out — skipping\"\n```\n\nTreat a failed host as **skip-and-continue with a logged warning**, never as a\nreason to block. Isolate each host so one failure cannot take down the sweep.\n\n## Failure 2: the watchdog trusts liveness, not progress\n\nA watchdog that only checks \"is the process \u002F tmux session \u002F pod still up?\" is\nfooled by a **live-but-stuck** worker: the process is running, so liveness is\ngreen, but it has been blocked on one hung SSH call for hours making zero\nprogress. Liveness ≠ progress.\n\n**Watch a heartbeat, not just a pulse.** The worker writes a monotonic\nheartbeat — a timestamp file, a counter, a `last_progress_at` field — every\ntime it actually advances (per host visited, per item done). The watchdog reads\nthat heartbeat and declares the worker **WEDGED** when it is *stale* beyond a\nthreshold, then restarts\u002Falerts:\n\n```bash\nage=$(( $(date +%s) - $(stat -c %Y \"$HEARTBEAT_FILE\") ))\nif (( age > STALE_THRESHOLD )); then\n  alert \"worker WEDGED — heartbeat stale ${age}s\"; restart_worker\nfi\n```\n\nReal incident: a global PR shepherd ran wedged for ~37 hours. The process was\nalive (liveness checks passed) but stuck on a single un-authable host's\ninteractive prompt; no heartbeat check existed to notice it had stopped making\nprogress.\n\n## Checklist\n\n- [ ] Every `ssh` uses `BatchMode=yes` + `ConnectTimeout`.\n- [ ] Every remote call is wrapped in an overall `timeout`.\n- [ ] A failed host is skipped-and-logged, never blocking.\n- [ ] The worker emits a heartbeat on real progress.\n- [ ] The watchdog flags **stale heartbeat** as wedged, not just dead process.\n",{"name":5,"description":7},"main","54007b08157feb09e5bb9d7ff5ce4ddd21625dbf","skills\u002Fbatched-ssh-enumeration",3,"https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills","https:\u002F\u002Fselamy.dev","https:\u002F\u002Fgithub.com\u002Fselamy-labs","2026-11-15 03:50:58",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add selamy-labs\u002Fagent-skills --skill batched-ssh-enumeration",{"tool":37,"command":38},"bunx","bunx skills add selamy-labs\u002Fagent-skills --skill batched-ssh-enumeration",{"tool":40,"command":41},"pnpm","pnpm dlx skills add selamy-labs\u002Fagent-skills --skill batched-ssh-enumeration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fbatched-ssh-enumeration\u002FSKILL.md",true,[],[46,53,60,67,73,80],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M75MY70JMSNFHQX63G90SKZ7","silence-phrase","A seemingly normal skill.","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsilence-phrase\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M75MY5PKVKY60M8H2DFTW58C","selamy-bad-skill","This skill has a vendor prefix that should be rejected.","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fprefixed-name\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M75MY1TKXCH6WYN9ET0W4T02","oversized-description","This is a very long description that contains way too many words and should be rejected by the validator because it exceeds the forty five word limit that is enforced by the naming lint checker which ensures skill descriptions stay concise and readable for humans and machines alike without unnecessary verbosity or padding","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Foversized-description\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M75MY0SZ7EKT99NWJEJ8HKS2","missing-frontmatter","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmissing-frontmatter\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M75MXYMBREE6D7KRR87YM4DH","malicious-skill","A poisoned skill used only as a negative fixture for the security gate.","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmalicious-skill\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M75MXX2B7AC2QSSRRQQXTA0N","leaking-org-name","A skill about something.","https:\u002F\u002Fgithub.com\u002Fselamy-labs\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fleaking-org-name\u002FSKILL.md",[],[]]