可以重启啊
你在检查一下你的sshd_config文件
修改之前备份了吗 对比一下修改前和修改后的区别 ------其他解决方案-------------------- 重启sshd时,
/var/log/secure 中总出现:
Jun 29 15:09:54 localhost sshd[27932]: Server listening on :: port 22.
Jun 29 15:09:54 localhost sshd[27932]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
我将端口改为 39 则出现:
Jun 29 15:09:54 localhost sshd[27932]: Server listening on :: port 39.
Jun 29 15:09:54 localhost sshd[27932]: error: Bind to port 39 on 0.0.0.0 failed: Address already in use. ------其他解决方案-------------------- 重启sshd时,
/var/log/secure 中总出现:
Jun 29 15:09:54 localhost sshd[27932]: Server listening on :: port 22.
Jun 29 15:09:54 localhost sshd[27932]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
-----------------------------
别随便修改端口 你是如何重启的
用root执行如下命令 看看是哪个程序在使用22号端口
/usr/sbin/lsof -i tcp:22