[root@openfire1 script]# cat test.sh #!/bin/bash #本地通过ssh执行远程服务器的脚本 for ip in `cat iplist` do echo $1 if [[ -z $1 ]]; then #"-z",如果为空 echo "Not find command." break else echo "$ip--
前言 批量登录SSH执行命令 ,把应急响应中的日志文件下载回来. 代码实现 Renci.SshNet编译出DLL,引用. using System; using System.Collections.Generic; using System.Text; using System.IO; using Renci.SshNet; namespace ConsoleApp1 { class Program { static void Main(string[] args) { string host