centos 6.3 直接拷贝centos 5的authorized_keys的问题

    由于想统一sshd的key认证,就直接拷贝了原来服务器上的authorized_keys,自己建立的/root/.ssh/。

    SecureCRT 登入时却报了root,用户名不对。

    后查google,解决如下:

/sbin/restorecon -r /root/.ssh

原帖解释如下:

*insert standard bit saying you should really consider leaving SELinux on*

If you created the files in .ssh yourself, they likely have broken SELinux contexts attached. You can easily fix it with:

 

 

 

你可能感兴趣的:(linux,SSHD)