Closed Nezteb closed 1 year ago
Hi @Nezteb
Thanks for your interest in k3sup.
I don't have time to investigate niche shells such as nushell, the main thing is that it's working as advertised for bash, which is what I'm happy to support, and if zsh also works, that's an added bonus.
Feel free to go wild, and if you can find out why nushell doesn't conform, raise an issue with their project, or fork k3sup and play around until you can make it work.
Alex
It's not only zsh issue, the issue that k3sup doesn't use ssh-agent
Why do you need this?
Wild title, I know. I've done my best to isolate the issue to something with
k3sup
I'm trying to use
k3sup
on a VPS. I use the 1Password SSH agent and it works great with both SSH connections andgit
SSH signing. When invoking a command that queries the active SSH agent, a 1Password popup prompts for auth and then will send the key to the requesting application.The odd part is that while both
zsh
and Nushell (nu
) have working SSH agent forwarding with the 1Password SSH agent, only in Nushell doesk3sup
fail to pull from the SSH agent. Instead,k3sup
defaults to trying to use~/.ssh/id_rsa
despite that file not existing on my machine:Also my SSH configs are the same for both shells.
Expected Behavior
I'd like
k3sup
to behave onnu
just as it does withzsh
.Current Behavior
Using
k3sup
innu
fails to read from the SSH agent and tries to read the non-existent~/.ssh/id_rsa
key.Possible Solution
I don't know if a change needs to happen in
nu
,k3sup
, or both. The only reason I'm making this issue here and not in the Nushell repo is because normal SSH agent forwarding works withnu
.As far as the code,
cmd/install.go:383
is being hit so somehowinitialSSHErr
is being set to a non-nil value.Steps to Reproduce
Verify that SSH forwarding works for both
zsh
andnu
:In
zsh
, runk3sup install --cluster --user root --host $VPN_HOST --k3s-channel stable
. Verify it works and triggers the 1Password prompt.In
nu
, run the same command. Notice error:Your Environment
k3sup install/join
):Hetzner Cloud (Debian 11) with public IP and and SSH access via SSH key
Do you want to work on this?
Subject to design approval, are you willing to work on a Pull Request for this issue or feature request?
Additional Context
I found a couple similar issues/PRs, but they're old so I imagine they aren't relevant: