目的: ubuntu18.04安装openssh,方便使用ssh链接工具进行链接。
1.更新源列表
sudo apt-get update
可能需要等待过长时间。
2.安装openssh-client
sudo apt-get install openssh-client
3.安装openssh-server
sudo apt-get install openssh-server
若报错:
Unable to locate package openssh-server
解决方法:
重新更新源文件内容:
sudo apt-get upgrade
等待更新完成,可能时间会较久。
重新执行查看结果:
sudo apt-get install openssh-server
4.启动ssh服务
sudo service ssh start
5.验证ssh服务是否启动成功
sudo ps -ef | grep ssh