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.

please help to a begginer user for using ssh !

Discussion in 'Security' started by netmoon, Mar 18, 2012.

  1. netmoon

    netmoon Registered

    Joined:
    Mar 18, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I'm beginner to CPanel & Linux. i've bought host and domain from a reseller.
    after reading this guide ( content2zero.com/setting-ssh-keys-access-cpanel-controlled-web-site-mac ) I'm creating paired keys and do following steps for using it in my cpanel ssh account.
    now when I want to connect ssh to my cpanel, it's not worked !
    I read many articles over the past two weeks from this forum and other blogs,In this case, but I've didn't find any solution about it.
    if i use this command line :
    Code:
    ssh cpanelUserName@domainName -v
    it shows this lines :

    Code:
    OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug1: Connecting to www.mydomain.com [x.x.x.x] port 22.
    and in the last line, it hangs and nothing happened !
    maybe you say my network don't allow me to connect, but currently i'm using ssh connection to connect to another domains , and it's worked fine !
     
  2. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    May I ask what program are you using to connect to your SSH?
    Please go to CPanelWHM - Security Center - Host access control
    What do you see. Make sure that your IP is in that list so that you are allowed to connect via SSH.

    Edit**
    If you are using keys... sorry that is different.
    Go to manage SSH keys and make sure your key is authorized.

    To view the entire process of connecting via SSH :

    ssh -vvvvv (username)@(IP of machine to connect too)
     
    #2 tank, Mar 18, 2012
    Last edited: Mar 18, 2012
  3. netmoon

    netmoon Registered

    Joined:
    Mar 18, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    i'm using bash terminal from UBUNTU 11.10.

    ya, i've checked it again and it's authorised.

    it's result of this command, in my terminal :

    Code:
    OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to www.myDomain.com [x.x.x.x] port 22.
    debug1: connect to address x.x.x.x port 22: Connection timed out
    ssh: connect to host www.myDomain.com port 22: Connection timed out
     
    #3 netmoon, Mar 20, 2012
    Last edited: Mar 20, 2012
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Are you certain you have sshd running on port 22? Did you happen to change the SSH port at some point as well?

    You are likely going to have to have your provider, datacenter or NOC gain physical access to the machine and reset your /etc/ssh/sshd_config file for you to the defaults in order to gain access. At that point, you can then check what is not working.

    Of note, I highly suggest to always keep a working SSH session on the machine when making changes to your sshd_config file. That ensures you can test if you can log into the machine after the changes are made. If you cannot, you still have a working session to reset the file / changes.
     
  5. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
  6. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Can you try with PuTTY and check what the Putty error logs are showing.....
     
Loading...

Share This Page