SSH: connect to host localhost or ip addr po

系统 1877 0

 

Solution:
One possible reason is that because the ssh server daemon , or sshd , is not loaded and running on localhost, so any attempt to ssh connect to localhost would fail. I check to see whether ssh and sshd are running by typing the following command:

        $ ps aux | grep ssh
# Result: bunch of lines, but none of them is about "sshd", only one line is about "ssh"
      

 

Result is, I only see ssh running, but not sshd. So I know ssh server daemon is probably not started yet.

First, I verify that I have installed the package “openssh-server” on my fedora box.

Then I check the status of sshd service:

 

You may not have OpenSSH completely installed. Type this in terminal:

        sudo apt-get install openssh-client
sudo apt-get install openssh-server
      

 

Another problem that you could have is that your firewall could be blocking the ssh connection. I use Firewall Configuration to manage my ports and firewall.

 

to restart it type

        sudo /etc/init.d/ssh restart
      

 

to stop it type

        sudo /etc/init.d/ssh stop
      

 

to start it type

        sudo /etc/init.d/ssh start
      

 

来源: http://stackoverflow.com/questions/14847718/ssh-connect-to-host-192-168-1-7-port-22-connection-refused

 

OpenSSH server on Mac OS X

OpenSSH server is part of Mac OS X and you don't need to install any additional package.

To enable the OpenSSH server of Mac OS X, open System Preferences:

 

Click on sharing and enable Remote Login:

This will start up OpenSSH server automatically.

 

来源: http://www.gooze.eu/howto/using-openssh-with-smartcards/openssh-server-on-mac-os-x

 

 

SSH: connect to host localhost or ip addr port 22: Connection refused


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论