网上的方法如下:
$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
经试验后还是需要密码
ssh -vvv localhost
查看debug信息发现如下信息:
debug1: Next authentication method: publickey
debug1: Offering public key: /home/xxxxx/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Trying private key: /home/xxxxx/.ssh/identity
debug3: no such identity: /home/xxxxx/.ssh/identity
debug1: Trying private key: /home/xxxxx/.ssh/id_dsa
debug3: no such identity: /home/xxxxx/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
修改authorized_keys权限
chmod 644 ~/.ssh/authorized_keys
此后登录不再需要密码。
ssh对文件的权限要求很高啊。太挑剔了。
相关推荐
hadoop集群服务器节点之间,无密码登录!!服务器本节点hostname无密码登录。
在linux上实现几台机ssh无密码相互登录
ssh登录使用radius服务器认证配置方法
linux下怎样设置ssh无密码登录.docx
centos下批量实现多台服务器之间的ssh无密码登录的信任关系
SSH实现无密码登录.docx
SCP 无密码登录 ssh 无密码登录 IPTALE 使用
针对两台服务器下的postgres数据库之间,实现无密码互相登录
如何配置ssh无密码远程登录在主机A上生成公约私钥对命令行输入:ssh-keygen -t rsa,连续回车3次,就会生成公钥私钥对:公钥上传到主机B的.ssh
ssh免密码;ssh免密码;ssh免密码;ssh免密码;ssh免密码;
NULL 博文链接:https://jrails.iteye.com/blog/1407036
之前采用上述步骤生成公钥后,将公钥拷贝到server端,但是始终连接不上,步骤都没有问题,后来发现,在secureCRT软件中,没有将ssh-rsa显示全,采用双屏显示器拉长才显示全(这个问题找了一晚上,真悲催!...
NULL 博文链接:https://mryangjw.iteye.com/blog/2062690
Linux配置ssh免密码登录调试文档,对配置hadoop有帮助
配置分两部分:一是对登录机的配置,二是对被登录机的配置,其中登录机为客户端,被登录机为服务端,也就是解决客户端到服务端的无密码登录问题。下述涉及到的命令,可以直接拷贝到Linux终端上执行,已全部验证通过...
ssh密码登录自动化配置脚本
ssh无密码登录,关键的是设置权限,防火墙的关闭
配置linux ssh免密码登录,第一行生成密钥,第二行是要对哪台机器免密码ssh登录就配置成哪一台,这里root@hadoop00,root是用户名,hadoop00是主机名
ssh登录到对方的机器而不需要密码,非常实用,特别是zookeeper,hadoop 教程也非常清晰,简单
linux系统下的ssh免密码登录机制原理及范例