赞
踩
可通过SSH服务远程登陆Linux系统,本文介绍如何安装相关服务和登陆方法。
(1)可通过下面命令安装SSH服务
sudo apt-get install -y ssh
上述命令相当于:
sudo apt-get install -y openssh-server openssh-client
注: 安装过程可能出现错误:
openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu1) but 1:6.6p1-2ubuntu2 is to be installed
解决方法详见《Ubuntu apt-get install错误:unmet dependencies》。
sudo yum install -y openssh-server openssh-clients # [10][11]
(1)开机启动
Ubuntu安装ssh服务后通常默认开机启动,但UOS Prov V20等发行版需要手动配置:
- sudo systemctl enable ssh # Ubuntu16.04+、UOS Pro V20
- # or
- sudo systemctl enable sshd.service # Fedora39
注:可通过下面命令确认ssh服务是否已经启动:
- ps -e | grep ssh # 通用
- # or
- sud
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。