ssh 无密码登录

方案1:

#!/sbin/sh
remoteip=$1
if [ -z $remoteip ];then
echo -n "please input remote ip"
return 0
fi
echo | ssh-keygen  -e 
ssh-copy-id -i  ~/.ssh/id_rsa.pub $remote



方案2:

sshpass


你可能感兴趣的:(ssh 无密码登录)