SSH setup on Mac Terminal

Discussion in 'Web Design and Development' started by SrWebDeveloper, Nov 1, 2010.

  1. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #1
    As part of a web project they're letting me use my MacBook Pro OS X 10.6.4 to ssh into their web server. They told me to ssh in as root but all they gave me was a .pem file (public key) and the IP of the server. No root password included, no instructions.

    I need to know exactly what steps to take (idiot proof please) to setup on my mac (i.e. Terminal setup, what to do with this .pem) so I can ssh using Terminal with only the file and info I got.

    I cannot use 3rd party software to make the ssh connection - don't ask, this is a client rule, it's beyond my control no matter how weird.

    Help!

    -jim
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    I'll take a guess, but haven't seen pem specifically.

    Code:
    ssh -i file.pem user@server
    I use this format for connecting w/o password to my web server for automated backups. It doesn't have anything to do with root privileges though. I'd guess that has to be setup server side anyways.
     
  3. DoFoT9 macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
    #3
    you have to place the .pem file into your ~/ ssh folder from memory. this is a list of "preapproved" accounts that can be accessed.

    normally its "ssh root@IP -p portnumber" then you press enter, then password. when you have copied the file in correctly it would be "ssh root@IP" and thats it! you are in.

    actually do this.

    host root@ip

    IdentityFile ~/.ssh/key-for-example.pem
     
  4. SrWebDeveloper thread starter macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #4
    Excellent, thanks. I also had to chmod 600 the pem file.
     

Share This Page