SSH and Mac OS X -- How Friendly?

Discussion in 'Mac Programming' started by bobber205, Sep 13, 2006.

  1. macrumors 68020

    bobber205

    Joined:
    Nov 15, 2005
    Location:
    Oregon
    #1
    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.)
     
  2. Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #2
    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?
     
  3. thread starter macrumors 68020

    bobber205

    Joined:
    Nov 15, 2005
    Location:
    Oregon
    #3
    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?
     
  4. macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #4
    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?
     
  5. thread starter macrumors 68020

    bobber205

    Joined:
    Nov 15, 2005
    Location:
    Oregon
    #5
    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?
     
  6. thread starter macrumors 68020

    bobber205

    Joined:
    Nov 15, 2005
    Location:
    Oregon
    #6
    For some reason it just worked.

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

    WHoot!
     
  7. macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #7
    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.
     
  8. thread starter macrumors 68020

    bobber205

    Joined:
    Nov 15, 2005
    Location:
    Oregon
    #8
    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!
     

Share This Page