ssh:connect to host localhost port 22: Connection refused解决方法

版权声明:本文为博主原创文章,未经博主允许不得转载,如果你非要转载,那能怎么办呢? https://blog.csdn.net/ghjzzhg/article/details/80674579

服务器传输数据时scp经常会报错:
linux系统(centos6.4) 
ssh:connect to host localhost port 22: Connection refused 
解决方法: 
1.检查是否安装了openssh-server

ps -e|grep ssh
  • 1

如果只出现了一个ssh,说明没有安装可以自行上网解决,一般centos是默认安装的,不会出现这种情况。 
2.sshd未启动

service sshd restart
  • 1

重启后 
scp应该能正常的看到输入密码。

猜你喜欢

转载自blog.csdn.net/ghjzzhg/article/details/80674579