开启ssh服务需要root权限,先用root账户登陆
先检查有没有安装ssh服务:rpm -qa | grep ssh
如果没有安装ssh服务就安装 : yum install openssh-server
安装好后在ssh配置文件里进行配置 : vim /etc/ssh/sshd_config
按 i 键进入编辑模式,去掉一下两项的#,如果使用root账号连接PermitRootLogin配置为yes(默认为no)
编辑完成后,按esc进入命令模式,输入 :wq 保存退出
修改完后用 /bin/systemctl start sshd.service 开启ssh服务
将ssh服务添加到自启动列表中:systemctl enable sshd.service
客户端xshell6个人免费版下载地址:
https://www.netsarang.com/zh/free-for-home-school/
Linux服务器部署.Net Core笔记:一、开启ssh服务
原文:https://www.cnblogs.com/lonelyxmas/p/12051887.html