安装Homebrew
1 | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
安装sshpass
1 | brew install http://git.io/sshpass.rb |
输出/usr/local/bin/sshpass
Item2配置
1 | /usr/local/bin/sshpass -p 123456 ssh -p22 root@192.168.1.41 |
操作
先用本地终端连接第一次,再用item2