Kovid Goyal
1a643441f3
Make the kitty public key available as an env var to child processes
2022-08-10 12:36:04 +05:30
Kovid Goyal
e2117ee8a4
ssh kitten: Allow completion of ssh options between the destination and command
...
This contravenes the documented command line parsing behavior of ssh but
matches its actual implementation. Sigh.
Fixes #5322
2022-07-29 08:29:49 +05:30
Kovid Goyal
d9371dc265
ssh kitten: Better handling of exit on keyboard interrupt
2022-07-20 21:40:51 +05:30
Kovid Goyal
ef2a12fbdf
Ignore sigint while draining the tty
2022-07-20 19:40:23 +05:30
Kovid Goyal
7215c6d6be
ssh kitten: Allow pressing Ctrl-C to abort ssh before the connection is completed
...
Fixing this involved adding a new mode to kitty where it handles
ctrl-c/z/q by sending signals to the tty foreground process group
instead of delegating to the kernel to do that. Since the pipe may be
full we have no way of knowing when the kernel will get around to
reading the signal byte. So send the signal ourselves.
Fixes #5271
2022-07-20 19:11:14 +05:30
Kovid Goyal
bd9e1f58fe
ssh kitten: Make discarding of garbage data after ssh fails more robust
...
We now roundtrip an UUID via the terminal and only exit after receiving
it back. This guarantees that any pending data in the pipe is discarded.
2022-07-20 13:28:51 +05:30
Kovid Goyal
3a17f54bca
Add a note about how to exclude directories in the copy command
2022-07-12 16:23:48 +05:30
Kovid Goyal
a8b756f040
ssh kitten: A new option :code:--symlink-strategy to control how symlinks are copied to the remote machine
...
Fixes #5249
2022-07-03 14:03:56 +05:30
Kovid Goyal
b3fcb53625
ssh kitten: Allow ssh kitten to work from inside tmux, provided the tmux session inherits the correct KITTY env vars
...
Fixes #5227
2022-06-29 18:40:22 +05:30
Kovid Goyal
9be68966b4
Also detect ssh kitten run as an overlay
2022-06-08 18:53:54 +05:30
Kovid Goyal
9dbafcc368
Remove unneccessary argument to connection_sharing_args()
2022-06-07 20:40:01 +05:30
Kovid Goyal
ebcbed290f
Make loading of kitty options in kitten re-useable
2022-06-03 17:49:58 +05:30
Kovid Goyal
55eeb9c11e
Dont import kitty.complete in ssh.main
2022-06-02 08:08:33 +05:30
Kovid Goyal
8540ca3990
Workaround for nix package messing with kitty file permissions
2022-05-28 08:03:17 +05:30
Kovid Goyal
bba1455e28
Dont import all of the ssh kitten just to detect commandlines
2022-05-18 15:58:06 +05:30
pagedown
6c1f20bb27
Docs: Mention close_shared_ssh_connections in ssh kitten config docs
2022-04-30 16:54:46 +08:00
Kovid Goyal
4a7125ec92
ssh kitten: Suppress error prints about invalid items in kitty.conf
...
Fixes #4985
2022-04-29 20:39:32 +05:30
pagedown
7282f1f684
Docs: Improve ssh kitten documentation
...
Add more text roles.
Put the env example at the end.
The alias syntax of fish and bash requires quotation marks.
Document `SSH_ASKPASS` in the glossary.
2022-04-25 15:36:37 +08:00
Kovid Goyal
b45fedd794
Infrastructure for serializing env blocks
2022-04-16 22:16:20 +05:30
Kovid Goyal
aab9482e31
...
2022-04-15 15:01:13 +05:30
Kovid Goyal
775584b5a5
Use literal quoting for env vars sent over ssh by clone
2022-04-15 14:34:21 +05:30
Kovid Goyal
bde468594e
ssh kitten: handle newlines in env vars
2022-04-15 12:49:35 +05:30
Kovid Goyal
a1bfcd9fc5
Also transfer env vars when cloning over ssh kitten
2022-04-13 20:08:06 +05:30
Kovid Goyal
dd331ca12e
ssh kitten: Allow changing terminal colors when connecting
2022-04-08 12:10:59 +05:30
Kovid Goyal
8ff841f1ac
...
2022-04-04 15:34:07 +05:30
Kovid Goyal
709c4abb53
Do not do automatic upgrades of remote kitty
...
Can be disruptive, since upgrading outputs to the terminal.
Instead updating can be triggerred manually with kitty update-kitty
2022-04-04 14:51:49 +05:30
Kovid Goyal
c07f164154
Implement an option to control the installation of the kitty bootstrap script
2022-04-03 20:30:16 +05:30
Kovid Goyal
bae9b095b4
Start work on kitty launcher for remote servers
...
This will automatically download kitty and run it. The ssh kitten
can add it to PATH thereby making kitty available on the remote machine
at low cost.
2022-04-03 15:10:20 +05:30
pagedown
98369db7f5
Unset shell integration env var before exec command
2022-03-24 22:01:11 +08:00
pagedown
5c02c370d4
ssh kitten: Allow to configure HOME environment variable
...
Useful if the user does not have a home directory or the directory is
not writable.
2022-03-24 22:00:41 +08:00
pagedown
276ba7754a
Add ssh kitten URL test
2022-03-23 20:08:50 +08:00
pagedown
4309aa1ace
ssh kitten: Fix SSH URL hostname matching
2022-03-23 18:39:27 +08:00
pagedown
ff8a99211d
Docs: Unify and generalize the terms remote computer, machine and host
2022-03-22 23:26:15 +08:00
pagedown
efda0ea455
Docs: Categorize the ssh kitten configuration options and minor tweaks
2022-03-22 23:25:59 +08:00
pagedown
1962519666
Only write to the OpenSSH version sentinel file once
2022-03-17 22:23:48 +08:00
Kovid Goyal
0a2768e496
Split up the bootstrap script to keep its size down
2022-03-16 07:17:12 +05:30
pagedown
576ab24609
Preserve line breaks to keep the line numbers in error messages
2022-03-16 08:58:50 +08:00
pagedown
150bf1a5b0
Reduce bootstrap script length by removing comments and indents
...
dropbear has 9000 bytes limit on ssh arguments length.
2022-03-16 01:03:51 +08:00
Kovid Goyal
82de6a1c56
DRYer
2022-03-15 22:12:49 +05:30
Kovid Goyal
1fbb4f763e
Only check OpenSSH version once on a machine if it is new enough
2022-03-15 22:09:40 +05:30
Kovid Goyal
20582431d6
typo
2022-03-15 21:50:55 +05:30
Kovid Goyal
8c6e7ce61a
...
2022-03-15 20:11:27 +05:30
Kovid Goyal
04ead526b9
Presend data on slave connections since for these SSH does not use the TTY
2022-03-15 20:09:05 +05:30
Kovid Goyal
ce1e22ac95
Have *_with_cwd work with the ssh kitten to open new windows auto-logged into the remote server at the current remote working directory
2022-03-15 19:59:16 +05:30
Kovid Goyal
a216f6bd46
ssh doesnt use askpass even if DISPLAY is set
...
It only uses askpass if not connected to a terminal
2022-03-15 17:27:57 +05:30
Kovid Goyal
c47e5372b5
native askpass should be used when requested
2022-03-15 15:54:48 +05:30
Kovid Goyal
daa673eff1
Make usage of need_to_request_data clearer
2022-03-15 15:51:49 +05:30
Kovid Goyal
5099dd6aa3
Only use kitty's askpass if DISPLAY is set or OpenSSH is new enough to support SSH_ASKPASS_REQUIRE
2022-03-15 15:47:02 +05:30
Kovid Goyal
7168ceab94
Make askpass a choice var
2022-03-15 13:14:53 +05:30
Kovid Goyal
868d57b818
...
2022-03-15 12:00:17 +05:30
Kovid Goyal
6057c57ea4
Fix garbage removal pafter SSH failure not working on macOS when run more than once
2022-03-15 11:57:28 +05:30
Kovid Goyal
e8437fd435
Make reading garbage more robust
2022-03-15 11:51:46 +05:30
Kovid Goyal
9e317971b4
Simplify garbage clear logic
2022-03-15 11:41:59 +05:30
Kovid Goyal
54c5faa12d
Simplify hostname matching
...
Now that we load the opts upfront, we can have load_config return the
final opts object itself
2022-03-15 11:25:21 +05:30
Kovid Goyal
9b0bd81661
Ignore hostname directives when using overrides
2022-03-15 10:38:03 +05:30
Kovid Goyal
52da68876d
Use a zero mtime for data.sh
...
Its a temp file and that way no chance of the time being in the future
2022-03-15 10:30:15 +05:30
Kovid Goyal
942881d1b7
Add a ntoe about the importance of askpass
2022-03-14 16:44:12 +05:30
Kovid Goyal
2a50203fcd
...
2022-03-14 13:44:18 +05:30
Kovid Goyal
90561682cf
Make using kitty askpass optional
2022-03-14 11:38:31 +05:30
Kovid Goyal
be8bfbe370
Refactor launch sequence in preparation for optionising it
2022-03-14 10:40:07 +05:30
Kovid Goyal
f7e4447b66
Dont transmit sensitive data unless actually needed
2022-03-13 15:43:14 +05:30
Kovid Goyal
df4e58bc39
Improve disposal of garbage data on ssh failure
2022-03-13 15:37:46 +05:30
Kovid Goyal
2b06ca5e1a
ssh kitten: Send data without a roundtrip
...
Send data to the remote side without waiting for a data request. Avoids
an extra roundtrip during initialization.
2022-03-13 13:55:30 +05:30
Kovid Goyal
e1504c4775
Avoid needing to initialize tty state in bootstrap scripts
2022-03-13 13:55:30 +05:30
Kovid Goyal
74f0057ec8
Dont change tty state to raw
...
Just turn off echo. Makes the code much simpler, can just use shell
builtin POSIX read function.
2022-03-13 13:55:30 +05:30
Kovid Goyal
b2e74e4830
Switch to using the hostname from the CLI for settings
...
This removes the need to wait for data from the remote machine
before sending data to it.
2022-03-13 13:55:30 +05:30
Kovid Goyal
f54a3e8036
Make requesting data optional
2022-03-13 13:55:30 +05:30
Kovid Goyal
ea74add814
ssh kitten: Restore terminal state after running ssh
2022-03-12 15:48:52 +05:30
Kovid Goyal
76de99a5a8
Use a custom askpass implementation
...
Keeps OpenSSH from using the tty hopefully allowing us to start sending
data without needing to wait for the remote side to request it.
2022-03-11 16:44:08 +05:30
pagedown
740e787f54
...
2022-03-11 17:28:29 +08:00
pagedown
bd87d50948
Remove the ssh folder in cache_dir
2022-03-11 16:47:03 +08:00
pagedown
d3c0c422a5
Add user uid suffix to tmp runtime dir symlink
2022-03-11 15:42:52 +08:00
Kovid Goyal
f080871911
Update the idiotic design symlink atomically
2022-03-11 07:54:16 +05:30
Kovid Goyal
c9ef5c0715
Avoid a race in creating the idiotic_design symlink
2022-03-11 07:37:44 +05:30
Kovid Goyal
f2d6ba8775
Workaround for socket path too long on macOS
2022-03-10 22:50:26 +05:30
Kovid Goyal
f774841ee0
More robust copying of terminfo
...
Dont use symlinks in the tarball, instead create them
in the bootstrap scripts, only if needed.
2022-03-10 21:08:20 +05:30
Kovid Goyal
c23e04fd03
DRYer
2022-03-10 15:37:10 +05:30
Kovid Goyal
f67009f554
Flush the write to shm explicitly
2022-03-10 15:01:58 +05:30
Kovid Goyal
31d9db7e74
Use XDG_RUNTIME_DIR to store control master sockets
...
On Linux this has the advantage that the dir is auto cleaned on reboot
2022-03-10 12:51:21 +05:30
Kovid Goyal
384c56f834
When using control masters also enable keep alives
...
Prevents the master connection from becoming stale. Use ssh protocol
keep alives rather than tcp ones as tcp ones are often blocked by
firewalls and also spoofable.
2022-03-10 11:48:36 +05:30
Kovid Goyal
920086ae88
unlink SHM file at end of each individual test
2022-03-10 10:57:36 +05:30
Kovid Goyal
4c392426f6
Get shared memory based data transfer working
2022-03-10 10:46:04 +05:30
Kovid Goyal
20962d989f
Use POSIX shm to pass ssh data to kitty
2022-03-10 06:55:21 +05:30
Kovid Goyal
aa4d36cc57
Use secrets to generate the random password
2022-03-10 06:11:58 +05:30
Kovid Goyal
8d119f06b3
Force restrictive permissions on file used to pass ssh data to kitty
2022-03-10 05:30:47 +05:30
Kovid Goyal
708c5126b9
Return the data cookie settings when generating the bootstrap script
2022-03-09 22:18:04 +05:30
Kovid Goyal
577de9f746
ssh kitten: Start work on connection sharing
...
Basic sharing works. Now investigate if we can eliminate the round-trip
latency by transmitting the data without waiting for the start message
when using a shared connection
2022-03-09 19:27:38 +05:30
Kovid Goyal
38a70f5b51
...
2022-03-09 15:31:19 +05:30
Kovid Goyal
118306a9ff
Avoid an extra process hanging around when running the interpreter on the remote machine
2022-03-09 15:29:57 +05:30
pagedown
d29fa7b382
ssh kitten: Add FreeBSD tcsh (csh) support
...
Replace line feeds and exclamation marks for tcsh compatibility.
2022-03-09 16:11:58 +08:00
Kovid Goyal
53b1607c4d
When testing ssh kitten launch the bootscrapt script the same way sshd does it
2022-03-09 11:25:02 +05:30
Kovid Goyal
2341a27f63
...
2022-03-08 23:05:42 +05:30
Kovid Goyal
0661caf9da
DRYer
2022-03-08 23:04:58 +05:30
Kovid Goyal
5b5bd77c53
ssh kitten: Fix not working when user's login shell is fish
2022-03-08 22:39:31 +05:30
Kovid Goyal
958ebb72a6
DRYer
2022-03-08 20:48:37 +05:30
Kovid Goyal
febc5c53a6
Get the python interpreter working with non-POSIX login shells
2022-03-08 20:44:29 +05:30
Kovid Goyal
6e921300e2
Let ssh concat the cli args for us
2022-03-08 19:49:25 +05:30
Kovid Goyal
5e457da30b
Only use bz2 compression if bzip2 is available
2022-03-07 20:44:26 +05:30
Kovid Goyal
855718b179
ssh kitten: match hostnames against both remote hostname and hostname used on the command line to connect to it
2022-03-07 20:32:02 +05:30
Kovid Goyal
c9071a66ca
ssh kitten: Add an option to change the cwd at login
2022-03-07 12:24:37 +05:30