Repository navigation
Releases
sshc 0.7.1
--dirand--entrycan be given inline, for one connection, before the host:sshc --dir /var/www w.go-2. Nothing is stored.- Inline, they also apply when you give a command:
sshc --dir /var/www w.go-2 git statusruns it in that directory, after the entry command, and stops if either fails. - An inline value replaces the stored one for that connection;
--no-entrymay now appear anywhere before the host, and wins over both. - They are long options only on a connection:
-dand-ethere would be read as ssh's own.
sshc 0.7.0
- A start directory and an entry command per host:
sshc set -H HOST -d /var/wwwandsshc set -H HOST -e 'COMMAND'(--dir,--entry). An interactive login to that host then starts in the directory, runs the command, and hands over to your normal login shell. - They apply only to plain
sshc HOSTat a terminal. A command of your own,scp,sftp,rsync,each,run, port forwarding with-Nand piped input are untouched - unlike ssh'sRemoteCommand, which applies to every connection. sshc --no-entry HOST(orSSHC_NO_ENTRY=1) logs in without them once.sshc unset -H HOST -d/-eremoves one;sshc listandsshc checkshow them.
This is the one case in which sshc adds to what it passes to ssh, and only for a host you have set it up for. It expects a Unix-style shell on the host.
sshc 0.6.2
No more "open a new terminal" after an update:
- The shell hook now keeps itself current.
sshc updateandsshc installreload it in the terminal they run in, and if sshc was updated some other way (a package manager, the install script in another window), the nextsshc set,unsetorusenotices the old hook and replaces it. - On Windows, the install script brings the PowerShell window it runs in up to date: the install folder goes on that session's
Pathand the hook is loaded, sosshcworks straight away. - On Linux and macOS,
sshc installends by naming the one command that refreshes the current terminal (. ~/.bashrcor the like), since a program cannot change the shell that started it.
A terminal opened before 0.6.2 still has the old hook, so it needs reopening one last time - or one sshc set, unset or use, which replaces it.
sshc 0.6.1
- While sshc is locked,
sshc set,sshc unsetandsshc usenow say so, so that a change made then does not look as if it had no effect.sshc listshows the lock as a message of its own, set apart by a blank line like every other message.
sshc 0.6.0
sshc lockswitches sshc off: while locked it supplies no stored password, passphrase or one-time code from any source, and connections ask you instead.sshc unlockswitches it back on after your device has verified you - Windows Hello on Windows, the account password on macOS and Linux.lock_after = 8h(or30m,2d, ...) in the config file locks sshc by itself when it has not been used for that long.sshc list,sshc checkandsshc doctorshow when sshc is locked.sshc lockrefuses where an unlock could not work: without Windows Hello set up, or as root.
The lock is a switch that sshc obeys, for a person at an unattended terminal or a stray script. It does not encrypt anything and does not stop other software running under your account from reading the credential store or removing the lock; SECURITY.md says so in full.
Known limitation: the Windows Hello prompt cannot be exercised by automated tests, so on Windows the unlock itself has been tested only as far as detecting that Hello is unavailable.
sshc 0.5.0
New commands
sshc doctorchecks the setup - OpenSSH version, copies of sshc onPATH, the shell hook, the config file, the credential store, ssh-agent - and says how to fix each problem.sshc updateinstalls the latest release after checking its checksum;sshc update --checkonly looks. A copy installed by Scoop, Homebrew or winget is pointed at its package manager instead.sshc use NAMEswitches the active profile for the current terminal;sshc use --save NAMEchanges the default;sshc useshows it.sshc migratemoves every plain-text secret in the config file into the credential store.sshc help COMMANDshows the help ofset,unset,use,runoreach.
One-time codes
sshc set -o -H HOST -c 'COMMAND'supplies the verification code a host asks for after the password, by running a command such asoathtoolor a password manager. It is opt-in per host.
Other additions
log = yesin the config file records every prompt sshc answers: when, for what, and where the secret came from. Never the secret.SSHC_NO_PROMPT=1makes sshc fail instead of asking on the terminal, for scripts and scheduled jobs.- On Windows,
sshc installnow adds the shell hook to your PowerShell profile itself when the script execution policy allows profiles to load. .deband.rpmpackages, a man page, and an AUR recipe.
Releases
- Releases are now built by GitHub Actions from the tagged commit and carry a build provenance attestation:
gh attestation verify <file> --repo W-Industries-Luke/sshc. - A
SECURITY.mddescribes how to report a vulnerability and what sshc does and does not protect against. - The end-to-end tests now also run on Windows and macOS, against an SSH server built into the test.
Fixed
- Tab completion of
user@h...no longer offers sshc's own commands.
sshc 0.4.0
New in 0.4.0
- Password managers.
sshc set -c '<command>'records a command instead of a secret; sshc runs it when the secret is needed and uses the first line it prints. Works with 1Password (op read ...), Bitwarden,pass, cloud secret services or your own script.%h,%uand%kstand for the host, user and key file. The command is run directly, not by a shell, andcheckandlistnever run it. sshc ssh-addunlocks a key intossh-agentusing the stored passphrase, so plainssh,gitand everything else stop prompting too.sshc run <command>runs any program that uses ssh underneath (git, Ansible, ...) with sshc answering the prompts. Name the hosts that may receive the active login password with-d.sshc each HOST... -- COMMANDruns a command on several hosts at once, with each line labelled by host and a summary of failures.- Host picker.
sshcon its own (orsshc pick) lists the hosts in your ssh config and connects to the one you choose;sshc hostsjust lists them. - Tab completion for host names, commands and options in bash, zsh, fish and PowerShell. It comes with the shell hook, so open a new terminal after upgrading.
- GitHub Action.
uses: W-Industries-Luke/sshc@v0.4.0installs sshc on Linux, macOS and Windows runners.
Install
irm https://raw.githubusercontent.com/W-Industries-Luke/sshc/main/install.ps1 | iex # Windows (PowerShell)
curl -fsSL https://raw.githubusercontent.com/W-Industries-Luke/sshc/main/install.sh | sh # Linux / macOS
scoop bucket add sshc https://github.com/W-Industries-Luke/scoop-bucket; scoop install sshc
brew install W-Industries-Luke/tap/sshc
Requires OpenSSH 8.5 or newer. Verify downloads against SHA256SUMS.
Known limitations
- Everything new in this release is tested on Linux, including against a real SSH server and ssh-agent. On Windows and macOS it is covered by unit tests and, for the action, by CI; nobody has yet used
ssh-add,run,each, the picker or completion by hand on Windows. The PowerShell completion was tested under PowerShell 7 on Linux. - The password manager examples in the README use each tool's documented syntax but were not run against those services; a stand-in command was used in testing.
- The credential-store backends pass automated round-trip tests on Windows, macOS and Linux, and the Linux one has been used end to end.
- A secret in the credential store is protected from other accounts and from someone reading the disk, not from programs running as you.
- The binaries are not code-signed, so Windows SmartScreen and macOS Gatekeeper may warn on first run.
sshc 0.3.2
Changes since 0.3.1
- sshc's own messages are easier to read: each command's output has a blank line above and below it and between separate messages, and on a terminal the key words are coloured (outcomes, notes and warnings, where a secret is kept, entry and variable names). Piped output stays plain; set
NO_COLOR=1to turn colour off.
See 0.3.0 for the credential store, unset, list and the short options.
Install
irm https://raw.githubusercontent.com/W-Industries-Luke/sshc/main/install.ps1 | iex # Windows (PowerShell)
curl -fsSL https://raw.githubusercontent.com/W-Industries-Luke/sshc/main/install.sh | sh # Linux / macOS
scoop bucket add sshc https://github.com/W-Industries-Luke/scoop-bucket; scoop install sshc
brew install W-Industries-Luke/tap/sshc
Requires OpenSSH 8.5 or newer. Verify downloads against SHA256SUMS.
Known limitations
- The credential-store backends pass automated round-trip tests on Windows, macOS and Linux, and the Linux one has been used end to end. The Windows and macOS ones have not yet been used interactively by a person.
- Windows support is new. Checked by hand on Windows with OpenSSH 9.5 (as of 0.2.1):
install.ps1,sshc --install, the PowerShell hook,sshc set --session, and connecting with a stored key passphrase. Not yet run on Windows: the Scoop package and login-password prompts. - A secret in the credential store is protected from other accounts and from someone reading the disk, not from programs running as you.
- The binaries are not code-signed, so Windows SmartScreen and macOS Gatekeeper may warn on first run.
sshc 0.3.1
Changes since 0.3.0
sshc --installnow warns when another copy of sshc comes first on yourPATH(for example one installed by Scoop), since that copy would keep running instead of the one just installed.sshc -hlists the short options ofsetandunset.
See 0.3.0 for the credential store, unset, list and the short options.
Install
irm https://raw.githubusercontent.com/W-Industries-Luke/sshc/main/install.ps1 | iex # Windows (PowerShell)
curl -fsSL https://raw.githubusercontent.com/W-Industries-Luke/sshc/main/install.sh | sh # Linux / macOS
scoop bucket add sshc https://github.com/W-Industries-Luke/scoop-bucket; scoop install sshc
brew install W-Industries-Luke/tap/sshc
Requires OpenSSH 8.5 or newer. Verify downloads against SHA256SUMS.
Known limitations
- The credential-store backends pass automated round-trip tests on Windows, macOS and Linux, and the Linux one has been used end to end. The Windows and macOS ones have not yet been used interactively by a person.
- Windows support is new. Checked by hand on Windows with OpenSSH 9.5 (as of 0.2.1):
install.ps1,sshc --install, the PowerShell hook,sshc set --session, and connecting with a stored key passphrase. Not yet run on Windows: the Scoop package and login-password prompts. - A secret in the credential store is protected from other accounts and from someone reading the disk, not from programs running as you.
- The binaries are not code-signed, so Windows SmartScreen and macOS Gatekeeper may warn on first run.
sshc 0.3.0
Changes since 0.2.1
- Saved secrets now go to your system's credential store - Windows Credential Manager, the macOS Keychain, or the Linux Secret Service keyring - instead of plain text in the config file. The file only records that an entry exists (
password = @credential-store). Where there is no store (servers, containers), or withsshc set --plain, sshc keeps the plain-text behaviour, and existing plain-text entries continue to work. Runsshc setagain to move an old entry into the store. sshc unsetremoves a stored entry;sshc listshows what is stored and where, never the values.- Short options for
setandunset, which combine:-ssession,-ppassphrase,-Hhost,-kkey,-Pprofile,-fplain,-nno-clear.sshc set -spissshc set --session --passphrase. - Plain-word commands:
sshc check,install,init,shell-init,helpandversion, alongside the--forms. sshc unset -sclears a session variable. The shell hook now handles everyset/unsetcall; open a new terminal after upgrading so the updated hook is loaded.
Install
irm https://raw.githubusercontent.com/W-Industries-Luke/sshc/main/install.ps1 | iex # Windows (PowerShell)
curl -fsSL https://raw.githubusercontent.com/W-Industries-Luke/sshc/main/install.sh | sh # Linux / macOS
scoop bucket add sshc https://github.com/W-Industries-Luke/scoop-bucket; scoop install sshc
brew install W-Industries-Luke/tap/sshc
Requires OpenSSH 8.5 or newer. Verify downloads against SHA256SUMS.
Known limitations
- The credential-store backends pass automated round-trip tests on Windows, macOS and Linux, and the Linux one has been used end to end. The Windows and macOS ones have not yet been used interactively by a person.
- Windows support is new. Checked by hand on Windows with OpenSSH 9.5 (as of 0.2.1):
install.ps1,sshc --install, the PowerShell hook,sshc set --session, and connecting with a stored key passphrase. Not yet run on Windows: the Scoop package and login-password prompts. - A secret in the credential store is protected from other accounts and from someone reading the disk, not from programs running as you.
- The binaries are not code-signed, so Windows SmartScreen and macOS Gatekeeper may warn on first run.