红联Linux门户
Linux帮助

ssh:connect to host localhost port 22:Connection refused(3

发布时间:2015-11-10 15:08:40来源:linux网站作者:linux人

Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused


造成这个错误的原因可能是ssh-server未安装或者未启动。ubuntu 11.10 默认安装openssh-client,但是木有安装server

运行 ps -e | grep ssh,查看是否有sshd进程


如果没有,说明server没启动,通过 /etc/init.d/ssh -start 启动server进程,如果提示ssh不存在 那么就是没安装server

通过 sudo apt-get install openssh-server命令安装即可。


ssh免密码登陆ubuntu腾讯云服务器:http://www.linuxdiyf.com/linux/15611.html

ssh远程打开ubuntu的vino-server:http://www.linuxdiyf.com/linux/15199.html

Linux下SSH远程连接服务慢解决方案:http://www.linuxdiyf.com/linux/12318.html

Ubuntu下SSH远程连接:http://www.linuxdiyf.com/linux/4436.html

采用SSH远程执行命令:http://www.linuxdiyf.com/linux/6110.html