Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ssh tunnel how to set up in SL?

I have a server running SL with the firewall activated. I want to tunnel in to it from outside my own network, while on the road. I have used SSH Tunnel Manager to do so in the past (like for 4 years) but can not get it to work today.


On my SL Server 10.6.8 I can not find anywhere to open ports, but I understand that if I activate File Sharing and Remote Management it will open port 22. Correct?


On my router I opened port 3283 and 5900. Correct?


Where I get stuck is what to put in to SSH Tunnel Manager. I can not find any clear novice instructions for it anywhere. And I am confused as to what to put where.


Can anybody help? Thanks.

MBP, MM, MBP - 10.6 + Windooz XP on a hard partition

Posted on Jun 21, 2012 9:12 AM

Reply
14 replies

Jun 21, 2012 10:06 AM in response to ChangeAgent

On your router, you need to direct a port to port 22 on the target computer on your network. Port 22 is a natural option, but you can specify a target port number to SSH, so it's not essential. You would provide your SSH client with the WAN-facing IP address of your router (who will then forward it to your computer), and the port you selected (22 is the default). You need not open/redirect any other ports on your router.


I would suggest that you familiarize yourself with SSH and how to use a certificate-based login instead of a password-based one, as that will be far more secure. You'll want to change /etc/sshd.conf on your Mac to disable password-based logins and use only certificates.


Of course, make sure that you have SSH enabled on your Mac (called "Remote Login" in the Sharing pane of System Preferences).

Jun 21, 2012 10:28 AM in response to J D McIninch

thanks, that helps.

J D McIninch wrote:


On your router, you need to direct a port to port 22 on the target computer on your network. Port 22 is a natural option, but you can specify a target port number to SSH, so it's not essential.

I did that.



J D McIninch wrote:


I would suggest that you familiarize yourself with SSH and how to use a certificate-based login instead of a password-based one, as that will be far more secure. You'll want to change /etc/sshd.conf on your Mac to disable password-based logins and use only certificates.


I do that as soon as I get it going the 'normal way'.


I still am looking for instructions as to ho to set up SSH Tunnel Manager. anybody?

Jun 23, 2012 6:17 AM in response to ChangeAgent

OK Bob, thanks. So I can close both those ports on my router, correct? Even though I want to go in (once my tunnel is there) with Chicken of the VNC to control the screen.

If you create an ssh tunnel between your systems where you are associating some local port with port 5900 on the remote system, AND if your Chicken connection is something along the lines of


Host: localhost (or maybe 127.0.0.1)

Display or port: <local_tunnel_port>


then yes, I would say you are using the ssh tunnel to connect to the remote system.


If your Chicken connection is NOT using 'localhost' (or 127.0.0.1), but instead is using the IP address of the router in front of the Snow Leopard server, then that is not tunneling.


I'm assuming you are using the Snow Leoopard Server's System Preferences -> Sharing -> Screen Sharing as the VNC server on the server. If that is the case, you can also use your local Mac's Screen Sharing client via Finder -> Go -> Connect to server -> vnc://localhost:<local_tunnel_port>


I tend to use the Connect to server approach, except if the bandwidth is really slow. Then I use a combination of Vine Server on the remote system and Chicken on my Mac. The reason I do this is because Chicken allows me to use reduced colors (like 8-bit colors), and the Vine Server both honors my reduced color request and it actually plays nice with reduced colors (the Mac OS X Screen Sharing server does not alway play nice with anything less then 32-bit colors, which needs a lot more bandwidth).


So connecting to work, or any of my Macs at home, I use the Mac OS X Screen Sharing client, but when connecting to my Mom's iMac, I use Chicken and the Vine Server (Mom has a much slower internet connection). Or if I'm stuck in a Panera Bread (shared bandwidth and often slow), and I cannot avoid connecting to another system, I'll go for the Chicken/Vine Server combo and reduced colors.

Jun 24, 2012 9:39 AM in response to BobHarris

Thanks Bob, it is raining cats and dogs so good time to check.


I got it all up and running.


I am testing from a real slow connection (on purpose as this what I have often being on the road) and the screen update is (too) slow. I tried all your methods and can not see any different in speed (read slowness).



BobHarris wrote:

The reason I do this is because Chicken allows me to use reduced colors (like 8-bit colors), and the Vine Server both honors my reduced color request and it actually plays nice with reduced colors (the Mac OS X Screen Sharing server does not alway play nice with anything less then 32-bit colors, which needs a lot more bandwidth).


Where or how do you implement this? I can not find it anywhere. I am on 10.6.8 btw.


And what is more my connection over Mac's Screen Sharing client, having Vine Server server turned on or not on the remote Mac makes also no difference. I can get in either way and speed is the same.


Here is the setting of my remote Mac just in case I should not turn both, the last two, on:


User uploaded file


Than there is an other problem.


User uploaded file


I suppose this is not a problem as I am tunnelling in over SSH, but would like to make sure.


I also tried to follow the instructions on the alert screen, but no such settings are to be found on the remote computer. Must be an out of date message text. Or am I blind?


Looking forward to your wisdom.


Message was edited by: ChangeAgent. Had an external link for the images as they refused to upload. Sometimes, when this happens, you can upload images after you post. That worked so removed links.

Jun 24, 2012 1:38 PM in response to ChangeAgent

"The computer "localhost" is running a VNC server that does not support Screen Sharing keystroke encryption. ..."


I suppose this is not a problem as I am tunnelling in over SSH, but would like to make sure.

Yes, the ssh tunnel is encrypting everything to and from the server. My first use fo tunnels was for just this reason. Basically securing the typically unsecured VNC connection between my Mom and me.


I suspect you get this message if you use the build-in Mac Screen Sharing client via vnc://localhost on the local Mac to connect with the Vine Server on the remote.


If you are running the Vine Server on the remote, make sure you either configure it with its own port number, such as 5901, or you turn off Screen Sharing and Remote Management Sharing System Preferences. Otherwise you are going to have them fighting over the use of port 5900. If you give Vine Server its own port number, make sure you setup your tunnel so that remote side of the tunnel setup points to the Vine Server port you configured.


To get reduced colors (and note, it is not pretty), you configure an 8-bit profile for Chicken of the VNC.


I generally use System Preferences -> Sharing -> Screen share instead of Remote Management. Remote Management is more intended for use with the Apple Remote Desktop (you gotta pay for it) software. And ARD is intended for managing a room full of Macs, such as a class room, or corporate setting. For what you are talking about, Sharing -> Screen Sharing is more than enough.


Chicken of the VNC -> Connection -> Connection Profiles - Default -> Color -> 256 Colors


Now when you connect, the Vine Server will ONLY send 8-bits per pixel, instead of 32-bits per pixel which will reduce the amount of data sent with each screen update. Of course the screen you see will be all blotchy, but it does improve the speed a little bit. But if the connection is very slow, you are at the mercy of the internet connection.

Jun 26, 2012 5:14 AM in response to BobHarris

BobHarris wrote:


First, an easy to remember, easy to type password is often much more secure than a short complex mess of upper/lower/numbers/special characters.

why would that be?



Second, if you are going for ssh-keygen keys, test, test, test, before disabling ssh password logins.

I understand, and ask why? do you have bad experiences? is it not working some of the time? Hard to remove later?

Jun 26, 2012 10:09 AM in response to ChangeAgent

BobHarris wrote:


First, an easy to remember, easy to type password is often much more secure than a short complex mess of upper/lower/numbers/special characters.

why would that be? Because lenght matters more than a convoluted password.

The bad guys have to guess, and unlike TV, they cannot guess the first letter, then guess the 2nd letter, then the 3rd letter etc... They need to guess every character of your password perfectly or they get rejected and they do not get any hints about how close they were.


So if you have a 1 character password, it takes 255 guesses (tops). If you have 2 character password, it takes maybe 65 thousand guesses, if you have a 3 character password it takes on the order of 16 million guesses, etc... So the longer the password the more guesses the bad guys need to try before they guess your password. Read the following web site: <http://www.grc.com/haystacks.htm>


Second, if you are going for ssh-keygen keys, test, test, test, before disabling ssh password logins.

I understand, and ask why? do you have bad experiences? is it not working some of the time? Hard to remove later?

If I screw up configuring the remote site (like my Mom's system), I have to travel to the remote site (Mom is 300 miles away), and that is not fun.


Also for systems such as my Mom's I configure the router to listen on a high numbered port and redirect that to port 22 on my Mom's iMac. Since the high numbered port is not a standard port number, the typical malware trying to break in, typically stick to well known ports and ignore the uninteresting high numbered port. So while this is NOT security, it reduces the noise my Mom's iMac sees as well as the number of possible break-in attempts. Then add in a long password, and I'm confortable that my Mom's iMac is secure.


Systems at work I frequently use ssh-keygen keys, but there I do that to make my life easy, as there are way too many software developers running around with sudo access, so I either need to trust them on go insane :-)

ssh tunnel how to set up in SL?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.