代码示例1 private void button1_Click(object sender, EventArgs e) { new Task(() => RunCommand()).Start(); } private void RunCommand() { var host = "hostname"; var username = "username"; var password = "password"; using (var client = new SshClient(host, username, password)) { ...