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 登陆