fix ssh in cmd mode

This commit is contained in:
ginuerzh
2022-04-07 23:04:46 +08:00
parent c70521ddab
commit 666846d352
3 changed files with 8 additions and 12 deletions

View File

@ -385,10 +385,8 @@ func buildServiceConfig(url *url.URL) (*config.ServiceConfig, error) {
Metadata: m,
}
if svc.Handler.Type == "sshd" {
if svc.Listener.Type == "ssh" || svc.Listener.Type == "sshd" {
svc.Handler.Auth = nil
}
if svc.Listener.Type == "sshd" {
svc.Listener.Auth = auth
}
@ -477,10 +475,8 @@ func buildNodeConfig(url *url.URL) (*config.NodeConfig, error) {
Metadata: m,
}
if node.Connector.Type == "sshd" {
if node.Dialer.Type == "ssh" || node.Dialer.Type == "sshd" {
node.Connector.Auth = nil
}
if node.Dialer.Type == "sshd" {
node.Dialer.Auth = auth
}