1检疫、需要用pem文件連接到centos系統(tǒng)中,
xshell 使用pem文件登錄:http://blog.csdn.net/gsying1474/article/details/50158817
2闽寡、修改root密碼
sudo passwd root
然后輸入兩次密碼
3、修改centos登錄方式為密碼登錄
打開配置文件 /etc/ssh/sshd_config (ubuntu 為/etc/ssh/sshd_config)尼酿,設(shè)置如下幾個參數(shù):
PermitRootLogin yes
PubkeyAuthentication no (也可用#號注釋)
PasswordAuthentication yes
4、重啟sshd服務(wù)
systemctl restart sshd
or service sshd restart