ssh tunnel in osx -- connection refused
I think you are mixing up two commands.
Try to set Firefox to Socks5 at port 12345 and run:

ssh user@host -D 12345




From the SSH manual, 'man ssh':

-D [bind_address:]port
Specifies a local “dynamic” application-level port forwarding. ... Currently the SOCKS4 and SOCKS5 protocols are supported, and ssh will act as a SOCKS server.


Your command user@host -L 12345:localhost:8080 -N forwards your local port 12345 to the remote host's port 8080. This would only work if there would actually be a proxy running on port 8080 on your remote host.