agentleFS
JPInertJPInert/claude-code-skills/skills/sshhost/SKILL.md

sshhost

Skill0 starsChanged 39 days agoMITView on GitHub

Make a new or rebuilt Linux box reachable as `ssh <name>` like your others - an ssh config entry that names the IP too, your key on the box, and a key-only test. Use when the user says /sshhost, "add the box to ssh", "so I can just ssh in", "make ssh X work", "why does ssh X ask for a password / say permission denied", and AUTOMATICALLY as the last step whenever a session creates, reimages or re-IPs a Linux box (cloud VM, Pi, laptop, container host).

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If your ~/.ssh/config is a symlink into a dotfiles repo, edit the repo copy and commit it, or the next machine will not have the entry.

    line 37
  2. Very specific:

    After a reimage, the host key changed: ssh-keygen -R <name> and ssh-keygen -R <ip>, then accept the new key once, deliberately.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- needs: OpenSSH client with an ed25519 key (~/.ssh/id_ed25519), password or console access to the new box once. --><!-- no accounts or hardware. Works best if your ~/.ssh/config ends with a strict `Host *` block like the one below. -->

Add a box to your ssh list

A box is "on the list" when all of these hold. Do every one, then run the test.

#WhatWhere
1Host <name> <ip> entry (the IP too, so a bare ssh user@<ip> also finds the key): HostName, User, IdentityFile ~/.ssh/id_ed25519~/.ssh/config, above Host *
2Your public key in the box's ~/.ssh/authorized_keyscloud: pass the .pub at launch; existing box: ssh-copy-id -i ~/.ssh/id_ed25519.pub user@ip
3The box's own aliases load in a login shellUbuntu/Debian .profile sources .bashrc, so put aliases in ~/.bashrc

Why the IP belongs on the Host line. A strict tail like

Host *
    IdentitiesOnly yes
    IdentityFile none

stops ssh offering every key it knows to every server (which trips MaxAuthTries and leaks which keys you hold). The cost: a bare ssh user@ip offers NO key and gets Permission denied (publickey) unless that IP is on a Host line with an IdentityFile.

Rules

  • ssh-copy-id reads the password from /dev/tty, not stdin. From an agent's shell (no TTY) it hangs or fails; run it in a pty, or have the user type it once. If SSH_ASKPASS and DISPLAY are set, ssh may pop a GUI dialog nobody sees; unset them for a terminal prompt.
  • A cloud box's public IP can change after a stop/start: update HostName AND the IP on the Host line, and say so.
  • If your ~/.ssh/config is a symlink into a dotfiles repo, edit the repo copy and commit it, or the next machine will not have the entry.
  • After a reimage, the host key changed: ssh-keygen -R <name> and ssh-keygen -R <ip>, then accept the new key once, deliberately. Never turn off StrictHostKeyChecking globally to make the warning go away.

Test (every time)

ssh -o BatchMode=yes <name> hostname        # key auth by name, no prompt
ssh -o BatchMode=yes <user>@<ip> hostname   # key auth by bare IP, proves step 1's IP

Both must print the hostname. Then tell the user the exact command they type: ssh <name>.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.