ssh: connect to host localhost port 22: Connection refused on Windows 10

13,546

You need to run a SSH server to allow people to SSH to your machine.

This is the first link I found on google for setting up windows 10's OpenSSH server:

https://www.bleepingcomputer.com/news/microsoft/how-to-install-the-built-in-windows-10-openssh-server/

And so I haven't tested it, however it hopefully shows you enough to allow you to setup SSH on your system and get connected - at which point you'll need to allow connections through your firewall to allow your friends to connect too.

Share:
13,546

Related videos on Youtube

Mich
Author by

Mich

Updated on September 18, 2022

Comments

  • Mich
    Mich over 1 year

    thanks in advance for the responses !

    I've been trying to make a multi node cluster with hadoop, but my mates can't ssh to my server. I have hadoop working, and daemons launched, but when I try to execute the command ssh localhost it gives me the error ssh: connect to host localhost port 22: Connection refused

    So if even I can't login to my localhost, how would my mates be able to do it..

    I've been having this problem since a week and i've tried lot of things so far but nothing seems to be working. Can anyone lend me a hand ?

    apache hadoop ssh localhost port

    • djsmiley2kStaysInside
      djsmiley2kStaysInside over 5 years
      is SSH running on your server? Provide server logs, client logs to help debug the problem.
    • Mich
      Mich over 5 years
      mmh, I have a question, i'm really new into all of these, when I do ssh localhost, it's on my local computer address right ? so I'm using my own PC for the server ? If so, I can't find the logs, I only have a " SecurityAuth-CRYSTA.audit "
    • djsmiley2kStaysInside
      djsmiley2kStaysInside over 5 years
      Yes, localhost will make it connect back to 127.0.0.1, your own machine. You need to start a SSH server, it isn't something that's running by default, generally.
    • Mich
      Mich over 5 years
      okay! I launched the hadoop daemons and the server is running on localhost:9870 , how would i be able to get connected to this server? One of my mate has it working on his pc too, but i can't seem to join our pcs with ssh-keygen and ssh [his ip]
    • djsmiley2kStaysInside
      djsmiley2kStaysInside over 5 years
      Hadoop isn't ssh - if you want them to be able to ssh in, you need to setup a SSH server. It's nothing to do with hadoop.
    • Mich
      Mich over 5 years
      okay so I've been on the wrong path since a long time.. i've been following a lot of tutorials but having trouble understanding them. My main goal is to connect my pc with my friend's pc and make a multi node cluster with hadoop. How can I acheive that ? or have you got any tutorial for windows ?
    • djsmiley2kStaysInside
      djsmiley2kStaysInside over 5 years
      I don't know any tutorials, nor anything really about hadoop. I'm presuming hadoop will connect over a SSH connection if you tell it to, and so that'd be a good way of protecting the traffic between you and a friend. I'd suggest you get SSH working first, then look at how you configure hadoop to do what you want. -- Unfortunately I can't help you any further than this (and the answer I provided).