当前位置首页 > Debian知识

DebianVPS配置ssh密码root登录

阅读次数:279 次  来源:admin  发布时间:

debian配置ssh密码连接是真的坑,晚上大多都不全,找起来很麻烦,这里记录一下。

修改root密码

udo passwd root

u root

然后修改 vi /etc/ssh/sshd_config文件内容 具体参考

1、查看是否安装 openssh-server,执行命令:yum list installed | grep openssh-server

如果有openssh-server,则是已安装,如果没有则需要安装,执行安装命令:yum install openssh-server

2、打开sshd配置文件sshd_config ,执行命令:vi /etc/ssh/sshd_config

去掉监听端口、地址前的注释:

3、开启远程登录:

4、开启用户密码作为连接验证,保存退出

引用该链接:https://www.pianshen.com/article/80791885627/

最后用 下面这个命令重启服务

ystemctl restart ssh

顺带提一下

想kill -9 pid 杀对应端口进程

查看对应端口进程的ID命令参数

etstat -nltp|grep 22

上一篇:手动配置Apache+Mysql+Php+phpMyAdmin全过程forVista
下一篇:CentOS6.5配置网络