小编Ful*_*ack的帖子

将 sshd_config 更改为端口 2222 后无法重新启动 SSH 守护程序

我一直在环顾四周,但找不到解决我遇到的问题的方法。我正在运行Ubuntu 16.04 LTS,我按照 Ubuntu页面上的说明2222通过更新sshd_config文件来更改 SSH 端口。

# What ports, IPs and protocols we listen for
Port 2222
Run Code Online (Sandbox Code Playgroud)

sudo systemctl restart sshd.service但是,当我执行命令时,我只收到以下错误:

Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.
Run Code Online (Sandbox Code Playgroud)

然后我执行命令systemctl status ssh.service并得到

? ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2016-09-07 23:24:04 EDT; 1min …
Run Code Online (Sandbox Code Playgroud)

linux ssh openssh ubuntu

6
推荐指数
2
解决办法
6万
查看次数

标签 统计

linux ×1

openssh ×1

ssh ×1

ubuntu ×1