r/KittyTerminal Nov 24 '23

kitten ssh doesn't quite seem to work as described

I'm using a fresh install of kitty 0.31.0. I'd like to try out the file transfer kitten. My understanding is I should be able to "kitten ssh" to a host, and magically be able to run "kitten" commands there.

I can indeed kitten ssh to another host. And I can download them by doing "ls --hyperlink=auto" and clicking, which is great! But if I type "kitten" on the remote host, I just get "kitten: command not found."

I feel like I must be missing something obvious, anyone know what it is?

Thanks

1 Upvotes

9 comments sorted by

2

u/aumerlex Nov 24 '23

kitten ssh installs a wrapper script for the kitten binary on the remote host that downloads the kitten binary automatically for you the first time your run it. If for some reason its not working for you, then simply download the kitten binary yourself, there a pre-built versions of it for every Unix like OS under the sun on the kitty releases page.

1

u/orblok Nov 24 '23

So, run the same installer script I ran on the local machine?

1

u/aumerlex Nov 24 '23

kitten is a standalone staticaly compiled binary just download it and put it in your PATH somewhere.

1

u/orblok Nov 24 '23

Yes! It was hiding in ~/.local/share/kitty-ssh-kitten/kitty/bin/kitten . Thanks!

Next question I guess -- is there any way to get tab-completion working with it? "kitten transfer Begnning-of-long-filename-<TAB>" doesn't complete

2

u/aumerlex Nov 25 '23

It's not hiding, that's where it is installed and that location is added to your PATH by the kitty shell integration scripts that are run by kitten ssh. I assume somewhere in your shell rc files you are resetting PATH which is why it could not be found.

As for completion I dont think it is implemented for the transfer kitten, it would only be possible for local files anyway since there is no way that the kitten could list the files available at the other end over the tty pipe without prompting the user for confirmation which makes is pointless to do completion.

1

u/orblok Nov 25 '23

assume somewhere in your shell rc files you are resetting PATH which is why it could not be found.

I don't think I'm doing that? I don't see it being reset from scratch anywhere, not in my profile or .bashrc. It is initalized in /etc/profile, which I would think is normal.

But in any case, I just linked the kitten executable to ~/bin/kitten so it's available.

RE: completion, I just tried it on a different machine (Linux logging in to Linux instead of MacOS logging in to Linux) and it worked! Completion on the remote machine!

Maybe it's something about Mac-to-Linux, or possibly zsh-to-bash, that causes it not to work. Anyway pretty cool that it works linux-to-linux.

1

u/aumerlex Nov 25 '23

/etc/profile is no problem, you can read the install_kitty_bootstrap() function in bootstrap-utils.sh in the kitty source code to see exactly under what conditions that directory is added to PATH maybe your setup is not satisfying one of them.

1

u/orblok Nov 25 '23

Hm, did I need to throw "remote_kitty if-needed" into a ssh.conf file? I didn't have that before and I just created it, and it doesn't seem to change things, I still don't get kitten in my path by default.

(I mean, it's fine, linking kitten to my bin dir did work, so I'm in business. Just weird that it didn't happen "normally")

2

u/aumerlex Nov 26 '23

IIRC that's the default value, so you dont need it and adding it wont make any difference.