安裝ssh服務器端
yum install -y openssl openssh-server
修改配置
vi /etc/ssh/sshd_config
打開注釋的行(如果沒有就添加):
PermitRootLogin yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
啟動ssh服務
systemctl start sshd.service
設置開機啟動
systemctl enable sshd.service
安裝客戶端
yum install -y openssh-clients
安裝完成執行ssh,如下提示即成功。