sudo yum -y install openssh-server $ sudo yum -y install openssh-clients
修改SSH配置文件以下選項,去掉#注釋,將四個選項啟用:
vi /etc/ssh/sshd_config
RSAAuthentication yes #啟用 RSA 認證 PubkeyAuthentication yes #啟用公鑰私鑰配對認證方式 AuthorizedKeysFile .ssh/authorized_keys #公鑰文件路徑(和上面生成的文件同) PermitRootLogin yes #root能使用ssh登錄
重啟ssh服務,並設置開機啟動:
service sshd restart
$ chkconfig sshd on
http://www.fecmall.com/topic/592