一、创建Shell脚本 cd /bin touch jps.sh 二、写脚本 #!/bin/bash for i in hadoop1 hadoop2 hadoop3 do echo " $i的jps " ssh $i "/opt/module/jdk1.8.0_144/bin/jps" done ...
实验服务器两台:192.168.77.189192.168.77.190服务器免密钥登录设置:[root@192_168_77_189 ~]# ssh-keygenGenerating public/private rsa key pair.Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empt