SSH互信
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SSH互信相关的知识,希望对你有一定的参考价值。
配置SSH免密码登录:
需要先关闭selinux,否则会互信失败
[[email protected] ~]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory ‘/root/.ssh‘. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 95:77:9d:9b:1d:43:5d:19:32:f2:7e:ad:97:f5:56:be [email protected] [[email protected] ~]#
此时还需要输入密码
[[email protected] ~]# scp .ssh/id_rsa.pub [email protected]:/root
[[email protected] ~]# cat id_rsa.pub >> .ssh/authorized_keys
[[email protected] ~]# chmod 600 .ssh/authorized_keys
[[email protected] ~]# ssh 192.168.100.249 Last login: Fri Jun 12 09:27:00 2015 from 192.168.100.251 [[email protected] ~]#
本文出自 “鹏城-酱油瓶” 博客,请务必保留此出处http://yfshare.blog.51cto.com/8611708/1758386
以上是关于SSH互信的主要内容,如果未能解决你的问题,请参考以下文章