SSH-FACTS(1)

πŸ“¦
version 1.10 Β· 3 versions
, in arch rolling, debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– SSH-FACTS πŸ’–

okay bestie, so you know how you ssh into a box and you're just... standing there like 🧍 not knowing anything about it? yeah. this is the fix. it's ssh-facts, it lives in the User Commands section of the manual, and it does exactly one (1) thing and does it flawlessly. no notes. πŸ’…


✨ NAME ✨

ssh-facts β€” get some facts about the remote system πŸ¦‹


🌸 SYNOPSIS 🌸

ssh-facts [user@]hostname

πŸŽ€ DESCRIPTION πŸŽ€

get some facts about the remote system. that's it, that's the whole vibe. you point it at a host, it comes back with the facts, no cap. 🫢

and then β€” because the girls love a pipeline β€” for further processing of the data you can use standard shell tools like awk, grep, sed, or convert it to JSON with jo and then feed it to jq. the way that just works? iconic. lowkey the whole point. ✨


πŸ”₯ EXAMPLES πŸ”₯

just go for it, fr fr:

ssh-facts 127.0.0.1

ok but what if you only want one fact? say less. grab it and slice it up with grep and awk:

ssh-facts 127.0.0.1 | grep ^OS_VERSION | awk -F'=' '{ print $2 }'

turning it into pretty JSON with jo? obsessed:

ssh-facts 127.0.0.1 | jo -p

piping that JSON straight into jq? main character energy:

ssh-facts 127.0.0.1 | jo | jq

or, my personal favourite, jq with a query so you get just the one field and nothing else:

ssh-facts 127.0.0.1 | jo | jq .OS_VERSION

like. the range. the versatility. she's everything. πŸ‘‘


ngl bestie, [user@] is in brackets for a reason β€” you can totally leave it off and let ssh figure out who you are. πŸŽ€

k that's the page!! this one came from the SSH-TOOLS fam, dated March 2024, and that's your sign-off, mwah. go get those facts. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from