Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug1: send_pubkey_test: no mutual signature algorithm #145

Closed
SURA907 opened this issue Jan 29, 2021 · 2 comments
Closed

debug1: send_pubkey_test: no mutual signature algorithm #145

SURA907 opened this issue Jan 29, 2021 · 2 comments

Comments

@SURA907
Copy link

SURA907 commented Jan 29, 2021

OS: fedora 33

$ ssh -V
OpenSSH_8.4p1, OpenSSL 1.1.1i FIPS  8 Dec 2020

Carete ssh key with `ssh-keygen -t rsa -C "[email protected]"

Then create a simple ssh server

package main

import (
	"fmt"
	"io"
	"os"

	"github.com/gliderlabs/ssh"
)

func main() {
	addr := "0.0.0.0:2222"

	serve := &ssh.Server{
		Addr:             addr,
		Handler:          SessionHandler,
		PublicKeyHandler: PublicKeyHandler,
	}

	err := serve.ListenAndServe()
	if err != ssh.ErrServerClosed {
		fmt.Fprintf(os.Stdout, "ssh server %s now: %v", serve.Addr, err)
	}
	fmt.Println("close ssh server")
}

func PublicKeyHandler(ctx ssh.Context, key ssh.PublicKey) bool {
	return true
}

func SessionHandler(s ssh.Session) {
	io.WriteString(s, "hello, world!\n")
}

Some Command

$ ssh -T sura@localhost -p 2222
sura@localhost: Permission denied (publickey).

Then run ssh -v -T sura@localhost -p 2222

It return debug1: send_pubkey_test: no mutual signature algorithm

When i remove the PublicKeyHandler from code, it works

$ ssh -T sura@localhost -p 2222
hello, world!

I found a document about this. But I don’t know if this problem belongs to the client or the server

https://confluence.atlassian.com/bitbucketserverkb/ssh-rsa-key-rejected-with-message-no-mutual-signature-algorithm-1026057701.html

Should I not use rsa ssh key or is there any other solution?
Thtank u!

@olivierlemasle
Copy link

Cf golang/go#37278

@SURA907
Copy link
Author

SURA907 commented Mar 1, 2021

Okay, I understand, I will close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants