ssh -o 常用选项

ssh -o ConnectTimeout=3 -o ConnectionAttempts=5 -o PasswordAuthentication=no -o StrictHostKeyChecking=no $ip  “command”

#ConnectTimeout=3                   连接超时时间,3秒
#ConnectionAttempts=5               连接失败后重试次数,5次
#PasswordAuthentication=no          不使用密码认证,没有互信直接退出
#StrictHostKeyChecking=no           自动信任主机并添加到known_hosts文件
posted @ 2018-01-09 10:25  Peterer~王勇  阅读(3190)  评论(0编辑  收藏  举报