Thread: SSH tunneling
View Single Post
ShadowOfGed
Travels via TARDIS
 
Join Date: Aug 2005
Location: Earthsea
 
2008-05-27, 20:17

If you're on Leopard, Screen Sharing provides a VNC service and is managed by launchd, so if you have Screen Sharing enabled, that could be the culprit as well. SSH is telling you that something on your computer is already using port 5900. However…

The local port (on your computer) and the remote port (on the server) need not be the same. I've used commands like this to access VNC servers that are behind a firewall that allows only SSH through:

Code:
ssh -L 1202:thraddash.local:5900 -C pemarks@my.hostname.net
Then when I open "Screen Sharing.app," I connect to localhost:1202, which is forwarded to thraddash.local:5900 on the remote side. Note that the remote side destination can be a hostname, and need not be the same server to which you've connected via SSH. So if 5900 is in use on your local system, just pick another port and manually override the default port in whatever application you're using.

Does that help?

EDIT: also note there's nothing inherently wrong with your iMac because of this. It's perfectly normal for a VNC server to occupy port 5900, which simply necessitates you finding another (free) local port for forwarding purposes.

Apparently I call the cops when I see people litter.

Last edited by ShadowOfGed : 2008-05-27 at 20:19. Reason: Minor addition about something being "wrong with [his] iMac."
  quote