connect to host localhost port 22: Connection refused

前端 未结 28 2212
误落风尘
误落风尘 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:22

    If you restart service then it will work

    $ service sshd restart
    

    then check

    $ ssh localhost
    

    It will work

    0 讨论(0)
  • 2021-01-29 19:22
    1. Before installing/reinstalling anything check the status of sshd . . .
    sudo systemctl status sshd
    
    1. You should see something like . . .
    ● sshd.service - OpenSSH server daemon
       Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor prese>
       Active: inactive (dead)
         Docs: man:sshd(8)
               man:sshd_config(5)
    
    1. Just enable and start sshd
    sudo systemctl enable sshd
    sudo systemctl start sshd
    
    0 讨论(0)
  • 2021-01-29 19:23

    I used:

    sudo service ssh start
    

    Then:

    ssh localhost
    
    0 讨论(0)
  • 2021-01-29 19:24

    If you still face problems, try the following:

    sudo ufw enable    
    sudo apt-get install openssh-server
    

    This might work too.

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

    If install Hadoop on Mac OSX, make sure turn on Remote Login under System Preferences then File Sharing. This worked on my machine.

    Remote Login

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

    My port number is different. i tried using

    ssh localhost -p 8088
    

    this worked for me

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