一,购买腾讯云服务器后使用xshell连接服务器会提示服务器拒绝连接,那么需要在服务器中安装ssh服务
1,在腾讯云控制台登录服务器
使用命令查看安装情况rpm -qa | grep openssh,出现以下安装说明安装完成,如果没有则安装缺失软件
rpm -qa | grep openssh2,安装缺失软件
sudo yum install openssh*启动ssh服务
service sshd start启动完后再使用xshell回报错:Connection closed by foreign host
vim /etc/ssh/sshd_config
# 添加或者注释下面两行
ClientAliveInterval 30
ClientAliveCountMax 60
PasswordAuthentication yes
#重启服务器
/etc/init.d/ssh restart
配置文件
https://share.feijipan.com/s/uCCIZh9mhttps://blog.csdn.net/baidu_38226233/article/details/103597985
爱笔记