2011年9月14日 星期三

不需密碼登入CentOS 6.0 minimal

登入環境

CentOS6.0 minimal install

必須先安裝CentOS上的  ssh-server
yum install openssh-server -y
#並且同時補安裝
yum install fprintd-pam -y
否則之後會再/var/log/secure 中出現

PAM unable to dlopen(/lib64/security/pam_fprintd.so): /lib64/security/pam_fprintd.so: 無法開啟共用目的檔: 沒有此一檔案或目錄

安裝後 將 登入主機的 dsa.pub 檔copy 至 centOS主機
mkdir .ssh
cat id_dsa.pub >> .ssh/authorized_keys

#並且將authorized_keys權限設定為600

chmod 600 authorized_keys

#並檢查/etc/ssh/ssh_config中設定值


RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys



是否正確

若無誤 應該可以正常登入了

沒有留言:

張貼留言