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 http://www.java.com for information on installing Java.
When I type
sudo service ssh status
, This is the error I get:
sudo: service: command not found
example
server? 3) What was the full output of the command that produced the Java error?localhost
is shorthand for 'me'. It won't connect to any other machine/VM except itself. After that, it's really not clear what you are trying to achieve.ping example
, does that reach the server? Also, as I commented on stackoverflow,apt
andservice
are not relevant on macOS (and since the macOS computer isn't the server, trying to install/start ssh service on it isn't relevant anyway).