补充 sudo.
Signed-off-by: chen.yang <chen.yang@yuzhen-iot.com>
This commit is contained in:
parent
9fe938d9e8
commit
f63fe2456b
|
@ -15,9 +15,9 @@ published: true
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Ubuntu
|
# Ubuntu
|
||||||
apt-get install openssh-server
|
sudo apt install openssh-server
|
||||||
# Manjaro
|
# Manjaro
|
||||||
pacman -S openssh
|
sudo pacman -S openssh
|
||||||
```
|
```
|
||||||
|
|
||||||
## 开启 SSH 服务
|
## 开启 SSH 服务
|
||||||
|
@ -122,19 +122,19 @@ UsePAM yes
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 开机自运行
|
# 开机自运行
|
||||||
systemctl enable sshd.service
|
sudo systemctl enable sshd.service
|
||||||
# 启动 sshd 服务
|
# 启动 sshd 服务
|
||||||
systemctl start sshd.service
|
sudo systemctl start sshd.service
|
||||||
# 查看 sshd 服务状态
|
# 查看 sshd 服务状态
|
||||||
systemctl status sshd.service
|
sudo systemctl status sshd.service
|
||||||
# 或(ubuntu12)
|
# 或(ubuntu12)
|
||||||
/etc/init.d/ssh restart
|
sudo /etc/init.d/ssh restart
|
||||||
```
|
```
|
||||||
|
|
||||||
如果没有 systemd,可以使用如下命令:
|
如果没有 systemd,可以使用如下命令:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
service ssh start
|
sudo service ssh start
|
||||||
```
|
```
|
||||||
|
|
||||||
## SSH 登陆
|
## SSH 登陆
|
||||||
|
|
Loading…
Reference in New Issue