Commit Graph

13 Commits

Author SHA1 Message Date
Kovid Goyal
aec3c82c48 ssh kitten: Fix a bug where automatic login was not working
Fixes #9187
2025-11-05 19:35:36 +05:30
Kovid Goyal
460d10902f Cleanup previous PR
The overrides were not being passed to the askpass kitten.
And we dont need to support backward compatibility for secrets with no
backend, since this feature has never been released.
2025-09-30 20:38:44 +05:30
NightWatcher
d02c63ac86 ssh kitten: add optional password and TOTP auto-fill via ssh.conf
Motivation: Some environments disallow or do not reliably accept one-way
pubkey-only auth, or require keyboard-interactive password + TOTP. This adds an
optional, host-scoped automation via kitty's native askpass to reduce repetitive
manual entry while preserving the ssh kitten UX.

- Add auth_config.go to parse password/totp_* from ssh.conf by host block
- Ignore these keys in main ssh.conf parser to avoid bad-line warnings
- Pass host/user to askpass for host-aware lookup
- Auto-answer password and OTP prompts in askpass; fallback to UI otherwise

Security: Secrets in ssh.conf are plain text; users should enforce strict
permissions or avoid storing passwords if unacceptable. Only login password/OTP
prompts are auto-answered; passphrases and host key confirmations are not.

feat(ssh): add secret backend support for auth passwords and TOTP secrets

Introduce support for specifying secret backends in SSH auth config, currently supporting only the "text" backend for storing secrets directly. This allows for future extensibility while maintaining backward compatibility by treating values without a backend as "text:<value>".

The changes include new fields in AuthEntry for backends, updated parsing logic in lineHandler, error handling for invalid backends, and normalization for existing configs. A new parseBackendSecret function handles the parsing with validation.
2025-09-30 17:31:16 +05:30
Kovid Goyal
c861259e3b Rename go module from kitty -> github.com/kovidgoyal/kitty
Makes the code more easily re-useable in other projects
2025-05-16 08:43:39 +05:30
Kovid Goyal
cf8407b8d3 ... 2025-02-09 15:10:41 +05:30
Kovid Goyal
8bf383d1c4 DRYer: Use the existing unix package stat() 2025-02-09 15:01:05 +05:30
Kovid Goyal
a582de98dc Fix building of kitten on other platforms 2025-02-09 14:11:14 +05:30
Kovid Goyal
2f775086b0 ... 2025-02-09 13:03:23 +05:30
Kovid Goyal
949860ff22 ssh kitten: Fix incorrect copying of data files when using the python interpreter and also fix incorrect hard link detection 2025-02-09 12:59:33 +05:30
Kovid Goyal
b21bbbe14c Fix ssh kitten override parsing ignoring settings inherited from ssh.conf
Fixes #6639
2023-09-20 09:15:38 +05:30
Kovid Goyal
18e5b74699 More linter fixes 2023-09-20 08:43:50 +05:30
Kovid Goyal
92e68a6e0c Fix #6193 2023-04-18 09:05:28 +05:30
Kovid Goyal
ff55121094 Move the kittens Go code into the kittens folder 2023-03-27 13:06:02 +05:30