The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't SSH into new server on a Mac

Discussion in 'General Discussion' started by avalive, Mar 22, 2007.

  1. avalive

    avalive Member

    Joined:
    Mar 22, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    We recently bought a new server and had WHM installed. After going through the setup process and adding a new account, I decided to try SSH to make sure it worked.

    So, I opened up my ssh program, iTerm, and tried logging in as root. After taking longer than normal, the prompt finally came up and I entered the password. When I hit Enter the session terminated. I tried this several more times with the same results. I also tried it using my mac console and basically got the same response. But then I tried connecting using putty on a pc and was able to log right in.

    Weird - anybody got any suggestions?

    Thanks
     
  2. fikse

    fikse Well-Known Member

    Joined:
    May 10, 2003
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    16
    some servers are setup to not allow remote root login..... can you login a regular account using the mac?
     
  3. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    I use Mac exclusively and have been admining a whm/cpanel server for years. You should be using your Terminal app (in /Applications/Utilities). That's not the same as the console app.

    For my server, I use the following command at the prompt...

    ssh -l root servername.com -p 1234

    ... then hit return .. and enter my pass when prompted

    Note: my ssh is set to a non-standard port, that's what the -p 1234 is for, where 1234 is my ssh port (not really 1234 but you get the idea)
     
  4. avalive

    avalive Member

    Joined:
    Mar 22, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    here's what I tried:

    $ ssh -l root xx.xx.xx.xx -p 22
    The authenticity of host 'xx.xx.xx.xx (xx.xx.xx.xx)' can't be established.
    RSA key fingerprint is xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'xx.xx.xx.xx' (RSA) to the list of known hosts.
    root@xx.xx.xx.xx's password:
    Connection closed by xx.xx.xx.xx
    $

    (I replaced the ip address and the key with X's)

    All of this takes forever too - which is unusual. After typing in the first command, I wait..........

    Then it asks me if I want to continue, type 'yes', and then wait......................

    And then it comes up with connection closed by the server

    I have tried using Mac's terminal app and another app I use for SSH called iTerm.

    I have successfully created a new account and then tried to log into the server with that account ( a non-root account) and i basically get the same thing.

    So, nothing works - root or non-root. But I can switch over to a PC in the office and get to it with no problems.

    I have tried deleting my known_hosts file but that does not work either.

    I am baffled - the hosting company nor cPanel have really given any good help with this.

    Please help.
     
  5. avalive

    avalive Member

    Joined:
    Mar 22, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I'm in!!!!!!!!!!!!!!!!!!!!!!!

    I edited my /etc/hosts file on my mac using the built in Terminal.

    I added a line like this xx.xx.xx.xx mydomain.com

    Saved the file and then tried to ssh into the server and was able to succesfully log in.

    Hope this helps someone else.

    finally!!!!!!!!!!!!!!!!
     
  6. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Just curious... what kind of Mac and OSX version? I've used 4 different Macs and a number of versions of OSX and have never had to do such a thing, There must be something else going on too :)
     
  7. zacamjo@mac.com

    zacamjo@mac.com Registered

    Joined:
    Apr 2, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Experiencing Same Problem, Still Cannot Connect

    OS X 10.4.9, PPC G5 w/ 2gb RAM
    Using 'Terminal.app'

    All attempts to connect to the server (using the WHM or cPanel ID's) fail:

    -----------------------------------------------------------------
    Welcome to Darwin!
    localhost:~ <user>$ ssh xx.xx.xxx.xx -p xxxx <login id>
    <user>@xx.xx.xxx.xx's password:
    Permission denied, please try again.
    <user>@xx.xx.xxx.xx's password:
    Permission denied, please try again.
    <user>@xx.xx.xxx.xx's password:
    Permission denied (publickey,password,keyboard-interactive).
    localhost:~ <user>$
    -----------------------------------------------------------------

    I tried avalive's fix but aparently I don't have a hosts file. I did try editing host info via 'NetInfo Manager.ap' (under applications/utilities) but to no avail. Anyone have any ideas?
     
  8. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Sorry I don't have any idea why you two are experiencing this. A good place for mac support though would be macfixit.com As to the hosts file, I believe you can just put one there if it doesn't exist (then reboot).
     
Loading...

Share This Page