vmware中的Ubuntu安装ssh全家桶(解决connect to host localhost port 22: Connection refused)...
2019獨角獸企業重金招聘Python工程師標準>>>
網上查詢過異常信息后得知系統需要安裝ssh服務。
1、重現問題:ssh localhost
報錯connect to host localhost port 22: Connection refused
2、查看是否已安裝ssh:ps -ef|grep ssh
如果沒有則需要安裝。
3、嘗試安裝:sudo apt-get install openssh-server
這是在網上找到的解決辦法,但是報錯:
提示寫著:需要下面幾個包,openssh-server、openssh-client、openssh-sftp-server等等。
注意需要的版本號,上圖中的 1:7.2p2 -4ubuntu2.1
4、安裝ssh全家桶
根據版本號找到網址?https://launchpad.net/ubuntu/+source/openssh/1:7.2p2-4ubuntu2.1
openssh_7.2p2-4ubuntu2.1.dsc中描述了需要的package-list:
Package-List:openssh-client deb net standard arch=anyopenssh-client-ssh1 deb net extra arch=anyopenssh-client-udeb udeb debian-installer optional arch=anyopenssh-server deb net optional arch=anyopenssh-server-udeb udeb debian-installer optional arch=anyopenssh-sftp-server deb net optional arch=anyssh deb net extra arch=allssh-askpass-gnome deb gnome optional arch=anyssh-krb5 deb oldlibs extra arch=all有點多...實際上我安裝了openssh-client、openssh-server、openssh-sftp-server、ssh(順序分先后),包都是在這個網站上下的。
5、驗證成功:ssh localhost
轉載于:https://my.oschina.net/wangbo888/blog/777398
總結
以上是生活随笔為你收集整理的vmware中的Ubuntu安装ssh全家桶(解决connect to host localhost port 22: Connection refused)...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: iOS开发 Xcode8中遇到的问题及改
- 下一篇: 转发与重定向的区别,特点