Ubuntu ssh: connect to host localhost port 22: Connection refused

I am trying to install Hadoop3.0 on my laptop which is Windows 10. I installed ubuntu 16.0.4 on the same laptop. Hadoop installation is complete but I am not able to start the daemon as it is throwing me port 22: connection refused error. I tried to uninstall and reinstall SSH. Also, changed the settings in sshd_config file as well. Unfortunately, nothing seems to be working. I have been stuck on this for about a week. Would appreciate if you could help me on this.

2

1 Answer

Try

sudo service ssh restart
ssh localhost

select option yes. You may get public key error

Then try

ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys

Once done.

Try ssh localhost

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like