先执行:

ssh localhost

会在~目录生成.ssh的隐藏目录:

centos 6.7 ssh免密登录配置_CentOS6