最近忙得忘乎所以,写篇博客放松放松,RT,直接上命令好了 # Local ssh-keygen -t rsa scp ~/.ssh/id_rsa.pub username@server:~/.ssh/ vi ~/.ssh/config 加入: Host nickname #别名,域名缩写 HostName XX #完整的域名 User XX #登录该域名使用的账号名 IdentityFile ~/.ssh/id_rsa #私钥文件的路径 # Server cat ~/.ssh/id_rsa.pu
设置ssh免密码登录脚本(hadoop自动化部署脚本一) 设置ssh免密码登录脚本(飞谷云大数据自动化部署脚本一) 1.#!/bin/sh2.#important note:this script is expected to run on master node3.PWD=hdp4.USER=hdp5.SSHDIR=/home/dhp/.ssh6.7.#create temp dir to store id_pub file8.mkdir $SSHDIR/sshtmp9.10.HOST=(ma