这是因为 diffie-hellman-group1-sha1 没有包括在 preferredKexAlgos之内,而这个是默认值

https://github.com/golang/cry...
所以如果想使用diffie-hellman-group1-sha1 需要自己添加

举个简单的例子
config := &ssh.ClientConfig{}
config.KeyExchanges = append(config.KeyExchanges, "diffie-hellman-group1-sha1")
sshconn, err = SFTDial("tcp", net.JoinHostPort(host, strconv.Itoa(port)), config)