Press "Enter" to skip to content

Ubuntu 18.04 ssh 开机自动启动的设置方法

# 开机自动启动ssh命令
sudo systemctl enable ssh

# 关闭ssh开机自动启动命令
sudo systemctl disable ssh

# 单次开启ssh
sudo systemctl start ssh

# 单次关闭ssh
sudo systemctl stop ssh

# 设置好后重启系统
reboot

# 查看ssh是否启动,看到Active: active (running)即表示成功
sudo systemctl status ssh
    发表回复

    您的电子邮箱地址不会被公开。 必填项已用*标注