ssh – Example of troubleshooting local port forwarding

Try to reproduce a local port forwarding example in 16.04 with the command:

$ ssh -L localhost


ssh: connect to host localhost port 22: connection refused

The tutorial sets the expectation: You will be asked to enter your user password for the client machine.

Essentially, you are connecting, through SSH, back to your
client machine, but creating the SSH tunnel necessary to
destination. After you have successfully authenticated against your
local account, open a browser and point it to
http: // localhost: 8080. Your browser should automatically redirect you
to Slashdot.

Any idea as to why my Ubuntu credentials are not requested on the command line is appreciated.