Tunneling (or Putty) for Mac

Joined
Jul 15, 2010
Messages
1
Reaction score
0
Points
1
Hi All ..
I'm new here and i need a bit of help with the mac
Basically what i need is a putty for my mac
Now i know i don't "really" need one - since i have the terminal, but the thing is i don't know how to define slightly more complex connection settings - such as tunneling. (i want to have the possibility to use my UNI computer from home)

if anyone knows the answer, you'll be saving me many hours! thanks! :D
 
Joined
Apr 20, 2009
Messages
137
Reaction score
1
Points
18
Location
Calgary
Your Mac's Specs
15" MBP
Tunneling?

If you simply want to ssh into a remote computer:

ssh <ipaddress> -l <username>
 
Joined
Oct 27, 2008
Messages
19
Reaction score
0
Points
1
if you want to tunnel a port, it's pretty easy at the command line.

sudo ssh username@servername -L:80:192.168.x.x:80 for instance will invoke a tunnel for port 80 to the specified address.

You need to use 'sudo' if your going to tunnel ports < 1024 as they are privileged
 
Joined
Jul 21, 2010
Messages
3
Reaction score
0
Points
1
need help with terminal for mac

Hi All. This is gonna be a little long . Please bare with me
I've been trying to use terminal just like spaceyoo for months , but I've never been able to. Please please help me. I'm gonna show u how I connect using putty in windows and I need someone to help me connect using mac. I really don't understand most of the terminology you guys use here like tunneling and port forwarding. I just wanna connect.

In windows The changes I made in putty were the following:

In the Seesion window, I typed in the IP address: ftp.xxxx.uni.edu Port 22 connection type: SSH

Then, when you click the + sign besides connection and the + besides SSH, click Tunnel and then you can see new spaces. In the space Destination I typed: www-yyyy.uni.edu and the source port : 8000.

Finally, when I go to internet explorer, tools, options, I click on connection tab then Lan setting. In the window that appears, under proxy server, Address: localhost, Port: 8000.
With these settings I can type in my username and password and get connected.


In mac, When I open Terminal, I was told type ssh -X 8000:localhost:8000 [email protected]

then type in my username and password to get connected. When I do that terminal shows a text similar to that shown by putty after I type in my user name and pass. But when I open Safari nothing happens.
I tried to go to Preferences, network, advanced, proxies, web proxy http and play with it but I couldn't.

I asked many people and some told me to type in ssh -l or ssh -N but none could work. I also tried to ssh -l [email protected] without the localhost bit but no luck.


I've been using windows for 5 months and I hate it. I wanna connect my mac and get my life back to normal.

Thanks
 
Joined
Feb 26, 2010
Messages
2,116
Reaction score
123
Points
63
Location
Rocky Mountain High, Colorado
Your Mac's Specs
1.8 GHz i7 MBA 11" OSX 10.8.2
With Windows and putty - you are doing the same thing. Basically you ssh to a server - then port forward through that server a tcp port for some service from another computer usually behind the firewall. So I think you are close but I believe you need to type (note capital L is important)

Code:
ssh -L 8000:www-yyyy.uni.edu:8000 [email protected]

Once you type that in - you will be portforwarding port 8000 of www-yyyy.uni.edu to localhost:8000 - 127.0.0.1:8000. Also the ssh command opens a ssh session on ftp.xxxx.uni.edu - you need to keep that ssh session alive so that ssh keeps forwarding port 8000. The easiest way to keep it alive is to run top. Anyway - it seems that you are going to a website of some sort - so the proxy should be fine again - localhost, port:8000
 
Joined
Jul 21, 2010
Messages
3
Reaction score
0
Points
1
Wow man. You are truly a legend. Thank you very much.

Everything works fine except for µtorrent and Mail! I thought mail uses the same settings Safari uses. but it isn't a big deal

Thanks again Ivan.
 
Joined
Jul 21, 2010
Messages
3
Reaction score
0
Points
1
Is there a way to automate the log-in process, instead of typing in the code line and my password every time?
and can I connect my iphone to the internet just like I did with my mac. I actually bought an ssh application but it couldn't help.

Thanks
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top