francoismichel / ssh3

SSH3: faster and rich secure shell using HTTP/3, checkout our article here: https://arxiv.org/abs/2312.08396 and our Internet-Draft: https://datatracker.ietf.org/doc/draft-michel-ssh3/
https://arxiv.org/abs/2312.08396
Apache License 2.0
3.27k stars 82 forks source link

panic: runtime error: index out of range [0] with length 0 #62

Closed metaip closed 9 months ago

metaip commented 9 months ago

Installed the program from source. Go version go1.21.4 linux/amd64

Run: **panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]: main.mainWithStatusCode() /install/ssh3-0.1.0/ssh3/cli/client/main.go:281 +0x65de main.main() /install/ssh3-0.1.0/ssh3/cli/client/main.go:1055 +0x13**

francoismichel commented 9 months ago

I think you should run the latest available version, it seems you run version v0.1.0 ?

It also seems you ran the ssh3 command with no argument. You need to specify a host to connect to, like this example in the README:

ssh3 -privkey ~/.ssh/id_rsa username@my-server.example.org/my-secret-path

But thank you for the issue, a readable error message or displaying the usage would be a lot more insightful than a panic, let's fix that.

metaip commented 9 months ago

Thank you guys!