先連上網,然后更換yum源
1. 新建的用戶沒有sudo權限,所以首先切換到root用戶
su -
輸入密碼
2. 備份之前的yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3. 下載yum源centos6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
4. 清理並生成緩存
yum clean all
yum makecache
安裝ssh server
$ yum search ssh $ yum install openssh-server $ chkconfig --list sshd sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off