一、开启ssh服务
- 先检查有没有安装ssh服务:
rpm -qa | grep ssh - 如果没有就安装openssh-server:
yum install openssh-server - 查看并修改ssh配置:
vim /etc/ssh/sshd_config - 启动ssh服务:
/bin/systemctl start sshd.service - 检查ssh服务是否开启:
ps -e | grep sshd - 检查 22端口 是否开启:
ps -e | grep 22 - 将ssh服务添加到自启动列表中:
systemctl enable sshd.service
二、使用Xshell6连接服务器
创建新的会话
连接即可,自己测试可以使用root用户登陆