Ssh: Connect to Host Example Port 22: Connection Refused

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
Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.