黑基网 首页 服务器 Linux 查看内容

ssh无密码访问

2011-7-13 11:26| 投稿: Linux

摘要:   1.在服务器端(192.168.0.1)产生密钥  [[email protected] ~]# cd /root/.ssh/  [[email protected] .ssh]# ls  known_hos...
  1.在服务器端(192.168.0.1)产生密钥  [[email protected] ~]# cd /root/.ssh/  [[email protected] .ssh]# ls  known_hosts  [[email protected] .ssh]# ssh-keygen -t dsa  Generating public/private dsa key pair.  Enter file in which to save the key (/root/.ssh/id_dsa):  Enter passphrase (empty for no passphrase):  Enter same passphrase again:  Your identification has been saved in /root/.ssh/id_dsa.  Your public key has been saved in /root/.ssh/id_dsa.pub.  The key fingerprint is:  26:67:d7:2c:27:8f:01:ea:a6:6c:34:d3:9d:04:ac:08 [email protected]  [[email protected] .ssh]# ls  id_dsa  id_dsa.pub  known_hosts  于是生成了id_dsa  id_dsa.pub两个文件。  2. #cp id_sda.pub authorized_keys  3.然后将。ssh文件夹拷贝覆盖各个节点间。ssh目录  [[email protected] .ssh]# scp -r /root/.ssh/ [email protected]:/root/  [[email protected] .ssh]# scp -r /root/.ssh/ [email protected]:/root/  [[email protected] .ssh]# scp -r /root/.ssh/ [email protected]:/root/  此时便可从服务器端无需密码就可以登录到各个节点。
小编推荐:欲学习电脑技术、系统维护、网络管理、编程开发和安全攻防等高端IT技术,请 点击这里 注册黑基账号,公开课频道价值万元IT培训教程免费学,让您少走弯路、事半功倍,好工作升职加薪!



免责声明:本文由投稿者转载自互联网,版权归原作者所有,文中所述不代表本站观点,若有侵权或转载等不当之处请联系我们处理,让我们一起为维护良好的互联网秩序而努力!联系方式见网站首页右下角。


鲜花

握手

雷人

路过

鸡蛋

相关阅读

最新评论


新出炉

返回顶部