From f63fe2456b84ad01b214fca325b76425ece20cc0 Mon Sep 17 00:00:00 2001 From: "chen.yang" Date: Wed, 15 Sep 2021 16:06:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=20sudo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chen.yang --- .../Applications/SSH/Linux_SSH_服务的安装和使用.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Software/Applications/SSH/Linux_SSH_服务的安装和使用.md b/Software/Applications/SSH/Linux_SSH_服务的安装和使用.md index d18cfff..92fe6cf 100644 --- a/Software/Applications/SSH/Linux_SSH_服务的安装和使用.md +++ b/Software/Applications/SSH/Linux_SSH_服务的安装和使用.md @@ -15,9 +15,9 @@ published: true ```bash # Ubuntu -apt-get install openssh-server +sudo apt install openssh-server # Manjaro -pacman -S openssh +sudo pacman -S openssh ``` ## 开启 SSH 服务 @@ -122,19 +122,19 @@ UsePAM yes ```bash # 开机自运行 -systemctl enable sshd.service +sudo systemctl enable sshd.service # 启动 sshd 服务 -systemctl start sshd.service +sudo systemctl start sshd.service # 查看 sshd 服务状态 -systemctl status sshd.service +sudo systemctl status sshd.service # 或(ubuntu12) -/etc/init.d/ssh restart +sudo /etc/init.d/ssh restart ``` 如果没有 systemd,可以使用如下命令: ```bash -service ssh start +sudo service ssh start ``` ## SSH 登陆