PDA

View Full Version : SSH and Mac OS X -- How Friendly?




bobber205
Sep 13, 2006, 12:12 PM
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
Sep 13, 2006, 12:20 PM
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
Sep 13, 2006, 12:23 PM
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
Sep 13, 2006, 12:43 PM
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
Sep 13, 2006, 12:44 PM
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
Sep 13, 2006, 01:42 PM
For some reason it just worked.

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

WHoot!

savar
Sep 13, 2006, 02:52 PM
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
Sep 13, 2006, 03:00 PM
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!