问题:ssh localhost 连接不上;
Permission denied, please try again
解决:
vim /etc/ssh/sshd_config
修改项:
PermitEmptyPasswords yes
PermitRootLogin yes
重启ssh服务
service sshd restart
测试
ssh localhost
自身免秘钥
ssh-keygen -t rsa
ssh-copy-id localhost
和远程主机免秘钥
//ssh-keygen -t rsa 因为上面执行了此步,此处不再执行
ssh-copy-id remote_ip
thinkpad-230
hostname:zhangjian-laptop
ip:10.209.157.44
Dell desktop
hostname:zhangjian-desktop
ip:10.209.157.51