Commit Graph

32 Commits

Author SHA1 Message Date
Kovid Goyal
3d8a2fbb4f Use SIMD base64 everywhere 2026-04-21 11:56:55 +05:30
Kovid Goyal
15a6a51a22 Fix RemoteCommand usage with bootstrap.py and bootstrap.sh not exiting after RemoteCommand 2026-04-15 05:37:56 +05:30
Kovid Goyal
a47093a7bf ssh kitten: Fix -o RemoteCommand handling 2026-04-15 05:19:22 +05:30
zhaolei
b86367483f Asynchronously read ssh configuration 2026-04-14 14:29:18 +08:00
zhaolei
9b02a59c4e Add support for RemoteCommand option in kitten ssh 2026-04-14 11:11:51 +08:00
newwares
828bd56fa5 ssh kitten: Push and pop keyboard encoding flags 2026-02-07 20:26:28 -05:00
Kovid Goyal
d19fc375ba Switch to external shm package 2025-11-10 12:01:05 +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
4713cc29ad make gofmt happy 2025-05-16 09:40:34 +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
4b6226a160 And another incorrect use of unix.Stat_t 2025-02-09 14:24:05 +05:30
Kovid Goyal
405f5ce148 Use stdlib maps/slices 2024-06-24 07:54:13 +05:30
Mike Giroux
4aeb32cc4f Trivial "It's"->"Its" fix 2024-05-27 10:44:03 -04:00
Kovid Goyal
8dfe1fcca9 Ensure clenup is run even when ssh child is killed by interrupt 2023-11-06 22:02:06 +05:30
Kovid Goyal
bd5fcb00e0 Fix regression that broke quick exit from ssh kitten 2023-11-06 21:22:41 +05:30
Kovid Goyal
bc1da5525e ssh kitten: Fix restore state not being called after interrupt 2023-11-05 08:38:04 +05:30
Kovid Goyal
d113a6c2cf ssh kitten: Fix a regression that broken ctrl+space mapping in zsh
Fixes #6780
2023-11-03 07:16:07 +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
1a32e62ebf More linter fixes 2023-09-18 21:07:39 +05:30
Kovid Goyal
73b1e3b8a1 SSH does not parse port from hostname when not using a ssh:// URL 2023-09-09 09:33:47 +05:30
Kovid Goyal
af4213579c ssh kitten: Fix a regression causing hostname directives in ssh.conf not matching when username is specified 2023-09-08 15:10:46 +05:30
Kovid Goyal
0be1295023 kitten run-shell: Make kitty terminfo database available if needed before starting the shell 2023-09-01 22:05:26 +05:30
Kovid Goyal
1f9852d76c ssh kitten: Easily forward the remote control socket tot he remote host 2023-08-04 14:36:50 +05:30
Kovid Goyal
092e0fba2c Work on code to run shells from a kitten with shell integration 2023-06-25 19:27:43 +05:30
Kovid Goyal
99012d2659 ssh kitten: Allow configuring the ssh kitten to skip some hosts via a new `delegate` config directive 2023-06-24 09:27:53 +05:30
Kovid Goyal
707cefd78a ssh kitten: When both passthrough args and --kitten args are present dont fail just ignore the kitten args 2023-06-24 09:14:25 +05:30
olzhasar
d0a5d1b3a4 Fix misspellings 2023-06-14 03:39:53 +06:00
Kovid Goyal
a1d791083b ssh_kitten: Proper exit code for termination by SIGINT 2023-05-08 16:27:07 +05:30
Kovid Goyal
454acd4f5c ssh kitten: Fix a regression in 0.28.0 that caused interrupt during setup to not be handled gracefully
Fixes #6254
2023-05-08 16:18:05 +05:30
Kovid Goyal
ff55121094 Move the kittens Go code into the kittens folder 2023-03-27 13:06:02 +05:30