mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-07 21:19:51 +00:00
chore: improve error
This commit is contained in:
parent
9ad0e6fb57
commit
8e5c36968a
@ -8,6 +8,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/pkg/sftp"
|
"github.com/pkg/sftp"
|
||||||
"github.com/povsister/scp"
|
"github.com/povsister/scp"
|
||||||
@ -313,7 +314,7 @@ func createSshClient(conn net.Conn, host string, port int32, authMethod string,
|
|||||||
if len(questions) == 1 {
|
if len(questions) == 1 {
|
||||||
return []string{password}, nil
|
return []string{password}, nil
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("unexpected keyboard interactive question: %s", questions[0])
|
return nil, fmt.Errorf("unexpected keyboard interactive question [%s]", strings.Join(questions, ", "))
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user