Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bobber205

macrumors 68020
Original poster
Nov 15, 2005
2,182
1
Oregon
This morning I tried logging into my macbook at home via SSH. Worked great.

But however, I cannot connect to local machines using local ip addresses. Why is this? It keeps saying "Connection refused".

Any suggestions? Any comments? I'm a little baffled and I'm anxious to go home this afternoon and make sure the settings are right. If I can connect to my local ip computers from my macbook at home, why can't I do the same when I log into it remotely?

( I posted this thread here as programmers would be the group of people most likely to know.)
 

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
14,423
1,063
Bergen, Norway
Have you opened the firewall/turned on the service on the other machines on the local network. (they are Macs, right?) System Preferences -> Sharing -> Services -> Remote Login -> Start?
 

bobber205

macrumors 68020
Original poster
Nov 15, 2005
2,182
1
Oregon
I'm 99% sure.

I've checked all of them except the apple remote desktop and apple events one.

EDIT: I've tried logging into the local ones via a linux box too. Same problems.

Any ideas?
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
bobber205 said:
But however, I cannot connect to local machines using local ip addresses. Why is this? It keeps saying "Connection refused".

So if I understand correctly, you're forwarded SSH in your NAT router configuration to your MBP. From the internet, you can SSH throught the router and log into the MBP. But once logged into the MBP, you are unable to telnet or ssh to any other computer behind the NAT router?

Are you sure you can do this locally? Are you logging in as the correct account?
 

bobber205

macrumors 68020
Original poster
Nov 15, 2005
2,182
1
Oregon
Last night, I did a shutdown on a local computer via logging into it via ssh.

Awesome!

I can log into the "root#" account. I did it last night and that's what account I'm getting as default today. is that the problem?
 

bobber205

macrumors 68020
Original poster
Nov 15, 2005
2,182
1
Oregon
For some reason it just worked.

Cool beans! I just shutdown a computer remotely!!!

WHoot!
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
bobber205 said:
Last night, I did a shutdown on a local computer via logging into it via ssh.

Awesome!

I can log into the "root#" account. I did it last night and that's what account I'm getting as default today. is that the problem?

I suggest you login as yourself to prevent accidentally deleting something you shouldn't. E.g.

ssh mhaase@myhost.net

In this syntax, I'm asking ssh to login as user "mhaase" on the machine myhost.net. Otherwise, ssh tries to login as whoever you are on the local system.

As root, you could do something like "rm -fr /" that would effectively hose your filesystem. As yourself you would see a lot of warnings and hopefully stop it before you deleted any of your personal documents. This is why people generally warn against logging in as root. Log in as yourself and use sudo when you absolutely need to do something you can't do as yourself.
 

bobber205

macrumors 68020
Original poster
Nov 15, 2005
2,182
1
Oregon
Thanks for the advice. I appreciate it!

I don't know why logged in as root. Last night, I did a sudo -s command to shutdown my computer. And I left it like that I guess. Would leaving it like that make me root when I log in remotely?

Now all I need to do is get a "Script" I can open that will launch my apache server and my VNC client in case it's not up..

Now THAT would be userful!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.