ssh: connect to host example port 22: Connection refused

I have given the following command in the terminal:

ssh -L 8080:localhost:8888 bb@example

However, the following error appears:

ssh: connect to host example port 22: Connection refused

I have also tried:

sudo apt list --installed | grep openssh-server

But the following error appears:

The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit for information on installing Java.

When I type

sudo service ssh status

, This is the error I get:

sudo: service: command not found
5 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

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