User Name
Password

Register Members List Calendar Search FAQ Posting Guidelines
Using SSH
Thread Tools
Kraetos
Lovable Bastard
 
Join Date: Dec 2005
Location: Boston-ish
 
2008-01-23, 15:24

I need to learn how to use and configure SSH. There are times when I am in the comp. sci. lab and it would be great if I could SSH back to my MBP in my dorm.

Where's a good tutorial on this kind of stuff? Thanks!

Logic, logic, logic. Logic is the beginning of wisdom, Valeris, not the end.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2008-01-23, 15:32

What's there to need to know about configuring SSH? Turn it on (one button in System Preferences: Sharing) and connect!

Or are you looking for a general primer on using command line shells (bash, tcsh, sh, zsh, etc.)?
  quote
Yonzie
Mac Mini Maniac
 
Join Date: Sep 2005
 
2008-01-23, 15:34

open terminal, type "man ssh" and/or "man ssh_config".

Other than that, my best suggestion is a blood transfusion from a UNIX hacker.
  quote
tomoe
Veteran Member
 
Join Date: Nov 2006
 
2008-01-23, 15:50

Quote:
What's there to need to know about configuring SSH? Turn it on (one button in System Preferences: Sharing) and connect!
This is great as I've been trying to get this working for a while. However, I've turned on SSH on my home laptop, then if I try to connect to it from school using ssh <shortusername>@<my IP from whatismyip.org>, terminal basically hangs and eventually I get a either a) "Timed out" error, or b) "Connection refused" error. Anyone have this experience?

Seen a man standin' over a dead dog lyin' by the highway in a ditch
He's lookin' down kinda puzzled pokin' that dog with a stick
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2008-01-23, 15:58

Quote:
Originally Posted by tomoe View Post
This is great as I've been trying to get this working for a while. However, I've turned on SSH on my home laptop, then if I try to connect to it from school using ssh <shortusername>@<my IP from whatismyip.org>, terminal basically hangs and eventually I get a either a) "Timed out" error, or b) "Connection refused" error. Anyone have this experience?
Are you sure your school doesn't firewall that sort of traffic?
  quote
Yonzie
Mac Mini Maniac
 
Join Date: Sep 2005
 
2008-01-23, 16:17

Try it from a friends place before screwing around with anything and always make a backup of the configuration if you're making changes.
To check if ssh itself works, you can just open terminal and ssh to your local IP.

Converted 07/2005.
  quote
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2008-01-23, 16:25

Quote:
Originally Posted by Yonzie View Post
Other than that, my best suggestion is a blood transfusion from a UNIX hacker.
Extra points if this hacker wears suspenders and has quite large beard!
  quote
tomoe
Veteran Member
 
Join Date: Nov 2006
 
2008-01-23, 16:29

Quote:
Originally Posted by chucker View Post
Are you sure your school doesn't firewall that sort of traffic?
I'm pretty sure they don't firewall SSH...we're sort of encouraged to use it for transferring large data files. I mean, if I'm at home on my laptop, I can easily SSH into my network drive at school, and then once I'm at this point (the network drive), I can alos SSH onto the local drive of the iMac I use, and have full use of applications that support 'tunneled' graphics (pardon if this is the wrong word) in X11. I tried trashing my ~/.ssh files on my laptop, and on my networked drive, to see if this could relieve the problem, but alas, it didn't work.

EDIT: I also forgot to mention I have no problem SSHing around on my LAN at home, use it all the time to transfer files, etc between the desktop and laptop.

Seen a man standin' over a dead dog lyin' by the highway in a ditch
He's lookin' down kinda puzzled pokin' that dog with a stick
  quote
colivigan
Veteran Member
 
Join Date: Nov 2005
 
2008-01-23, 16:42

Can you describe your home network setup? If you're behind some kind of broadband router, you'll probably need to set up port forwarding on the router to pass SSH connections to your MBP.
  quote
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2008-01-23, 16:45

Hmm.

tomoe, do I understand correctly that you can sit down at the school computer (or SSH into a school machine) and subsequently from there SSH into the iMac which is at your home? But you can't SSH from school into the laptop even if you activate SSH serving on it, disable the firewall, and plug the laptop in the same exact place the iMac is normally plugged into? How do the laptop and the iMac connect to the Internet, for that matter?

I'm pretty sure you'll find a firewall or port forwarding at work somewhere (the laptop, a router of yours you didn't mention, a router at the dorm...) that explains this. They can mess connections in just one direction.
  quote
Yonzie
Mac Mini Maniac
 
Join Date: Sep 2005
 
2008-01-23, 17:20

Koodari: I understood it as the iMac at school.

I'm with UncleJohn about there probably being a router or something that blocks outside access to your LAN.
  quote
tomoe
Veteran Member
 
Join Date: Nov 2006
 
2008-01-23, 17:25

Quote:
Originally Posted by Koodari View Post
Hmm.

tomoe, do I understand correctly that you can sit down at the school computer (or SSH into a school machine) and subsequently from there SSH into the iMac which is at your home? But you can't SSH from school into the laptop even if you activate SSH serving on it, disable the firewall, and plug the laptop in the same exact place the iMac is normally plugged into? How do the laptop and the iMac connect to the Internet, for that matter?
Sorry for the lack of clarity. There's an iMac I use at school (in an office) that I SSH onto sometimes to run programs/store large data files.

Quote:
I'm pretty sure you'll find a firewall or port forwarding at work somewhere (the laptop, a router of yours you didn't mention, a router at the dorm...) that explains this. They can mess connections in just one direction.
I have Port Forwarding setup on my broadband router (Linksys WRT54G running DD-WRT); I'm using the following setup:

Under...
Applications:Port Forwarding:

Port From is set to 22
Port To is set to 22
IP Address: set to IP of Client (i.e. computer at school)

I'm not at home right now, but I'll double check and run SSH using the -v flag to see if that spits out anything.

Seen a man standin' over a dead dog lyin' by the highway in a ditch
He's lookin' down kinda puzzled pokin' that dog with a stick
  quote
Yonzie
Mac Mini Maniac
 
Join Date: Sep 2005
 
2008-01-23, 17:44

Quote:
Originally Posted by tomoe View Post
IP Address: set to IP of Client (i.e. computer at school)
There's your error. It should be the IP of the computer you want to connect to from the outside, ie. the local IP of the MBP. You'll probably need to give it a static IP to avoid problems.

EDIT: Basically, you tell the iMac to SSH to your public IP. Your public IP is the router. The router doesn't know what to do with the connection, so it drops it. This is where you tell the router that if it gets an connection on port 22, it should forward it to [some IP on the local network behind the router].
The same is not true for the iMac, since it has a public IP address (meaning one that is "visible" to the entire internet (your local network cannot be routed on the internet, the router acts as an interpreter)).

Converted 07/2005.
  quote
Koodari
Veteran Member
 
Join Date: Jun 2004
 
2008-01-23, 17:45

The key to all of these problems is elimination. First thing I'd do is bypass the router and plug the laptop straight into the wall. If you get SSH going that way, then you have the problem narrowed down to the router. If it doesn't work, I'd keep the router on the sidelines until you figure it out or give up, just in case the router *also* has a problem - the last thing you want to do is to try some fix, and think it didn't work, when it actually did and another problem just isn't letting you see it.
  quote
Kraetos
Lovable Bastard
 
Join Date: Dec 2005
Location: Boston-ish
 
2008-01-23, 18:02

Quote:
Originally Posted by Brad View Post
What's there to need to know about configuring SSH? Turn it on (one button in System Preferences: Sharing) and connect!

Or are you looking for a general primer on using command line shells (bash, tcsh, sh, zsh, etc.)?
Well then, there it is. I feel dumb.

I am familiar with bash so no problem there.

Now, system preferences gives me a local (10.0.1.x) ip addy for the SSH login. I am assuming that I would want to use my external ip if I we're to login from somewhere else?

Logic, logic, logic. Logic is the beginning of wisdom, Valeris, not the end.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2008-01-23, 18:55

Quote:
Originally Posted by Kraetos View Post
Now, system preferences gives me a local (10.0.1.x) ip addy for the SSH login. I am assuming that I would want to use my external ip if I we're to login from somewhere else?
Correct!

And if you're behind a router, you'll have to configure port forwarding on the router as the folks above mentioned.
  quote
colivigan
Veteran Member
 
Join Date: Nov 2005
 
2008-01-23, 20:20

And you'll probably need to configure your MBP with a static IP on the home network, since port forwarding needs a local IP address.
  quote
tomoe
Veteran Member
 
Join Date: Nov 2006
 
2008-01-23, 23:06

Quote:
Originally Posted by Yonzie View Post
There's your error. It should be the IP of the computer you want to connect to from the outside, ie. the local IP of the MBP. You'll probably need to give it a static IP to avoid problems.
D'oh! Worked like a charm once I entered the local IP. Thanks for the help.
  quote
Kraetos
Lovable Bastard
 
Join Date: Dec 2005
Location: Boston-ish
 
2008-01-24, 00:41

Quote:
Originally Posted by Brad View Post
Correct!

And if you're behind a router, you'll have to configure port forwarding on the router as the folks above mentioned.
Awesome. Got everything set up. Now I can access all my files from anywhere on campus - thats great. Thanks
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC and SSH naashraf Genius Bar 8 2009-11-22 05:07
ssh not working through Terminal kieran Genius Bar 7 2007-08-18 10:52
SSH connection to Mac naashraf Genius Bar 4 2006-03-28 08:10
ssh question bruce Genius Bar 4 2005-09-09 13:31
Advanced SSH (well for me) ast3r3x Genius Bar 3 2004-08-09 15:31


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 03:17.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova