connect to host localhost port 22: Connection refused

前端 未结 28 2214
误落风尘
误落风尘 2021-01-29 19:01

While installing hadoop in my local machine , i got following error

ssh -vvv localhost 
OpenSSH_5.5p1, OpenSSL 1.0.0e-fips 6 Sep 2011 
debug1: Reading configura         


        
相关标签:
28条回答
  • 2021-01-29 19:46

    Check if this port is open. Maybe your SSH demon is not running. See if sshd is running. If not, then start it.

    0 讨论(0)
  • 2021-01-29 19:47

    You may should edit your /etc/hosts. For example if my hostname is ub0, but the hostname in /etc/hosts is localhost, it may occur

    connect to host ub0 port 22: Connection refused
    

    Because the hostname in /etc/hosts is localhost not ub0.

    So, you should be careful the hostname when building up distributed clusters.

    0 讨论(0)
  • 2021-01-29 19:47

    Check file /etc/ssh/sshd_config for Port number. Make sure it is 22.

    0 讨论(0)
  • 2021-01-29 19:49
    1. Remove SSH with the following command:

      sudo apt-get remove openssh-client openssh-server
      
    2. Install SSH again with:

      sudo apt-get install openssh-client openssh-server
      

    It will solve your problem.

    0 讨论(0)
提交回复
热议问题