upterm: Upterm rejecting all ssh connections
I was trying to spin up my first upterm session; after running upterm host -- bash
I am presented with the expected ssh session information, but when I attempt to connect to that session from another system, I get a “permission denied” error:
[lars@madhatter ~]$ ssh hGjlbiMJqi0M9Jjo4SSo:...@uptermd.upterm.dev
hGjlbiMJqi0M9Jjo4SSo:...@uptermd.upterm.dev: Permission denied (publickey).
I haven’t included any --authorized-key
argument in my upterm host
command so I expected any ssh client to be able to connect.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (6 by maintainers)
Okay, the root of the issue is that since openssh 8.8 (2021-09-26), the host algorithm type
ssh-rsa
was retired in favor ofrsa-sha2-256
&rsa-sha2-512
(release note). This breaks a lot of ssh servers, includingupterm
. The Go issue that tracks the fixes of the Go ssh library is here. I will closely monitor it and pull in changes. Can you do a quick check of your openssh version with:What happens is that you only have a rsa key in your
~/.ssh
, andupterm
is not ready to handle theopenssh
8.8+ client that deprecates thessh-rsa
host algorithm type. However,openssh
8.8+ using other key types work withupterm
, e.g. Ed25519. For now, you can workaround by adding thessh-rsa
type back:You can also put in your
~/.ssh/config
with the following to save you from typing the-o
flags for every Uptermssh
command:I would strongly recommend you to upgrade all your ssh keys to Ed25519 because that’s the most secured ssh algorithm that is recommended to use over others: https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54.
I will leave this issue open until
upterm
with the fixed Go ssh library. Hope this helpsWell where I was going with that was that following the instructions to support RSA still doesn’t work and still produces an error whereas @larsks got it to work.
Hi, I have followed the above but getting the same thing since tmate no longer works:
I still get the following:
Any other suggestions?
I finally can reproduce it. It happens when I don’t have the key in the ssh-agent. I will see where the problem is, fix it and report back. It’s likely a recent change that broke it