Open accidentaldevelopment opened 1 year ago
The built-in ssh seems fairly limited in what it supports from your ssh config. See https://wezfurlong.org/wezterm/ssh.html
From what I can see you would need it to support (edit: misread OPs linked article)TrustedUserCAKeys
(assuming the underlying library supports it).
If you have a limited set of hosts, you might consider using remote domains. While the built-in ssh domain support has the same issue, you can create a unix domain that uses system ssh to connect a proxy, and so that supports whatever your system ssh can do (I use it for enabling port and X11 forwarding for example). See https://github.com/wez/wezterm/issues/1846#issuecomment-1094123557
Where are your certificate files stored? Are they in the .ssh
directory? What are they named?
Does your ssh config specify their name/location?
From the debug logs you shared it looks like a lot of standard paths are tried based on the default IdentityFile
config, which only includes .ssh/id_dsa
, .ssh/id_ecdsa
, .ssh/id_ed25519
and .ssh/id_rsa
. Can you try explicitly setting that to have the path to your cert?
Where are your certificate files stored? Are they in the .ssh directory? What are they named?
~/.ssh/id_ed25519-cert.pub
Does your ssh config specify their name/location?
It does not
From the debug logs you shared it looks like a lot of standard paths are tried based on the default IdentityFile config, which only includes .ssh/id_dsa, .ssh/id_ecdsa, .ssh/id_ed25519 and .ssh/id_rsa. Can you try explicitly setting that to have the path to your cert?
I don't currently have IdentityFile
set. The equivalent cert option is CertificateFile
. Based on the docs, that isn't supported, but I have tried using both and the result is the same. The path above is one of the defaults for CertificateFile
though, so I think it should work as long as the underlying ssh lib knows to offers certs. My private key is kept in the agent, but I tried putting it in ~/.ssh
to see if that helped and it does not.
I'd suggest asking the libssh folks for assistance on configuring this; I'd be happy to adjust wezterm's integration based on what you find out from them.
Took a look at this, seems like wez is incorrectly determining that cert based authenticate as public key authentication. There is an example in the libssh repo on how to do cert based authentication: https://gitlab.com/libssh/libssh-mirror/-/blob/master/tests/client/torture_auth.c#L834
Any plan to support "Certificate based Authentication"? (It's not "Public Key Authentication".)
Ref.: https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Certificate-based_Authentication
I think libssh 0.11 should support this automatically: https://www.libssh.org/2024/08/08/libssh-0-11-0-release/
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
20230119-104405-60922b9e
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
western ssh
does not seem to work with ssh certificates. It looks like the certificate isn't being offered or checked for.To Reproduce
wezterm -n ssh -v $REMOTE
.Configuration
No config
Expected Behavior
A successful login to the remote server. The server handles authorization(s) based on the certificate, so nothing more needs to happen in wezterm.
Logs
Anything else?
I have no public or private key files in my
~/.ssh
. The standard (on macOS) ssh client works just fine. If I put my public key back in the directory then everything works as expected withwezterm
, so this seems to be related to just certificates.I also tried the
CertificateFile
ssh option. It wasn't listed as supported in the docs, but I tried it anyway. It did not affect the results.