一,启动:service ssh start
如未安装则sudo apt-get install openssh-server
安装完成后service sshd start启动
查看是否启动成功:ps - e |grep ssh
二,更改ip地址(我试了没效果)

二,关闭防火墙:
service iptables stop
chkconfig iptables off
开放22端口:sudo ufw allow 22
三,若提示ssh拒绝密码,则进入cd /etc/ssh
vim sshd_config
将 # Authentication:
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes
改为:
#Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
该博客主要介绍了Linux系统中SSH服务的相关配置。包括启动SSH服务,若未安装需先安装再启动,并可查看启动状态;还提及更改IP地址(未成功)、关闭防火墙及开放22端口;若提示SSH拒绝密码,可修改相关配置文件。
3050

被折叠的 条评论
为什么被折叠?



