https://github.com/vaporup/ssh-tools Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} vaporup / ssh-tools Public * Notifications * Fork 8 * Star 153 * Making SSH more convenient GPL-3.0 License 153 stars 8 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 2 branches 8 tags Code Latest commit @vaporup vaporup Don't set HashKnownHosts=no ... 4c0df69 Jan 16, 2022 Don't set HashKnownHosts=no Some Distros sets several options as standard in /etc/ssh/ssh_config. Debian uses HashKnownHosts=yes by default so entries in ~/.ssh/known_hosts get mixed with hashed and unhashed entries. Removing this option, so ssh's default gets used 4c0df69 Git stats * 359 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time demos [refactor] use Perl for *BSD systems Jul 14, 2019 examples Rename example folders Jan 22, 2020 prototypes Don't set HashKnownHosts=no Jan 16, 2022 .gitattributes export-ignore prototypes folder Jan 5, 2019 .shellcheckrc Add .shellcheckrc Jan 23, 2020 CHANGELOG.md Prepare 1.7 Release Oct 31, 2021 LICENSE Create LICENSE Oct 3, 2017 README.md Add CISS badge Aug 7, 2021 ssh-certinfo [shellcheck] Fix SC2206 warnings Jan 23, 2020 ssh-diff [shellcheck] Disable SC2184 warning and optional SC2102 error Jan 23, 2020 ssh-facts Update explorers Dec 19, 2019 ssh-force-password Use correct command name in header Aug 3, 2021 ssh-hostkeys [shellcheck] Disable optional SC2249 errors Jan 23, 2020 ssh-keyinfo [shellcheck] Disable SC2207 warnings Jan 23, 2020 ssh-ping Don't set HashKnownHosts=no Jan 16, 2022 ssh-version Don't set HashKnownHosts=no Jan 16, 2022 test.sh Prepare 1.7 Release: Please shellcheck Oct 31, 2021 View code [ ] ssh-ping ssh-version ssh-diff ssh-facts ssh-hostkeys ssh-keyinfo ssh-certinfo ssh-force-password Packages README.md [6874747073] [6874747073] [6874747073] [6874747073] [6874747073] ssh-ping Check if host is reachable using ssh_config * Outputs Reply from when server is reachable but login failed * Outputs Pong from when server is reachable and login was successful $ ssh-ping -c 3 kim SSHPING kim Reply from kim: ssh_seq=1 time=109 ms Reply from kim: ssh_seq=2 time=136 ms Reply from kim: ssh_seq=3 time=141 ms --- kim ping statistics --- 3 requests transmitted, 3 requests received, 0% request loss ssh-version Shows version of the SSH server you are connecting to $ ssh-version kim Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.6 ssh-diff Diff a file over SSH $ ssh-diff /etc/hosts kim Comparing kim:/etc/hosts (<) with /etc/hosts (>) 1,2c1,2 < 127.0.0.1 localhost < 127.0.1.1 kim --- > 127.0.0.1 localhost > 127.0.1.1 blinky ssh-facts Get some facts about the remote system $ ssh-facts kim OS=ubuntu OS_VERSION=16.04 UPTIME=7 days, 22 hours, 25 minutes LAST_REBOOT=Dec 20 19:34:27 2018 CPU_CORES=2 CPU_SOCKETS=2 HOSTNAME=kim KERNEL_NAME=Linux MACHINE=x86_64 MACHINE_TYPE=virtual_by_kvm MEMORY=4045996 INIT=systemd LSB_CODENAME=xenial LSB_DESCRIPTION=Ubuntu 16.04.5 LTS LSB_ID=Ubuntu LSB_RELEASE=16.04 ssh-hostkeys Prints server host keys in several formats $ ssh-hostkeys kim (ECDSA) 256 MD5 3d:8e:49:6e:40:34:c6:e4:c8:5f:60:d9:ad:bf:1f:b9 (ECDSA) 256 SHA256 txYpmPENBWolKBaA5EkCM/y1Hm2DP81jtABFrWUBf/c (ED25519) 256 MD5 a8:93:71:f9:13:d0:32:02:c0:e5:1e:f6:b9:db:8c:b0 (ED25519) 256 SHA256 JZMLzNS2ifdGYv2SrqDodz7+/qaRCTBPukaCnMQqbX8 (RSA) 2048 MD5 8b:37:63:cd:58:fd:9c:18:93:08:3a:4c:84:64:87:91 (RSA) 2048 SHA256 WkOzD8BaeljejgTTAwECkByyb4kHdI0pnJB2/gcS1Lk ssh-keyinfo Prints keys in several formats $ ssh-keyinfo ~/.ssh/*.pub (RSA) 2048 MD5 40:52:aa:14:a5:9a:fe:b5:96:c0:d2:dc:99:f1:a5:77 /home/vaporup/.ssh/id_rsa.pub (RSA) 2048 SHA256 V4F6ipY4gG83sQGM0eRk0+g1RWE9K4asDUj1jFpCa48 /home/vaporup/.ssh/id_rsa.pub ssh-certinfo Shows validity and information of SSH certificates $ ssh-certinfo ~/.ssh/*.pub /home/vaporup/.ssh/id_rsa-cert.pub SSH_CERT_VALID forever -> forever /home/vaporup/.ssh/test1-cert.pub SSH_CERT_INVALID 2038-01-19T04:14:07 -> 2038-01-19T04:14:07 /home/vaporup/.ssh/test2-cert.pub SSH_CERT_EXPIRED 1988-11-14T13:36:40 -> 1991-08-11T14:36:40 $ ssh-certinfo -v ~/.ssh/*.pub /home/vaporup/.ssh/id_rsa-cert.pub: Type: ssh-rsa-cert-v01@openssh.com user certificate Public key: RSA-CERT SHA256:Mm7o312345YEaWetVshTBslX48h0XJceLWzxx3RugDg Signing CA: RSA SHA256:4fcOpOm/Xk12345mYnihk0cr6SdjghPgONxriMJex+A Key ID: "vaporup" Serial: 0 Valid: forever Principals: (none) Critical Options: (none) Extensions: permit-X11-forwarding permit-agent-forwarding permit-port-forwarding permit-pty permit-user-rc ssh-force-password Enforces password authentication (as long as the server allows it). It became quite annoying googling the SSH options for this every time. e.g. used to skip key-based login for password testing. $ ssh-force-password kim vaporup@kim's password: Packages Packaging status About Making SSH more convenient Topics ssh Resources Readme License GPL-3.0 License Stars 153 stars Watchers 7 watching Forks 8 forks Releases 8 ssh-tools 1.7 Latest Oct 31, 2021 + 7 releases Packages 0 No packages published Contributors 2 * @vaporup vaporup Sven Wick * @ericcurtin ericcurtin Eric Curtin Languages * Shell 100.0% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.