在Ubuntu18.04使用命令安装SSH时,报了错误The following packages have unmet dependencies:等等
sudo apt install openssh-server
提示说是openssh-server 依赖于 openssh-client 而实际上 openssh-client 已经是最新版本了。首先想到的是先卸载再重新安装一下试了一下果然成功了。
-
sudo apt-get autoremove openssh-client openssh-server
-
sudo apt-get install openssh-client openssh-server
-
sudo /etc/init.d/ssh start
重启ssh ,测试成功
可以使用
netstat -tlp
来确认 ssh-server 已经正常工作。如果显示如下图所示则成功安装了ssh。