Skip to main content

Enabling SSH for cPanel Account Not Working

Comments

10 comments

  • cPanelMichael
    Hello @the_Dsigner, Can you monitor the /var/log/secure log file when you attempt to login as the individual user via SSH and let us know the output? EX: tail -f /var/log/secure
    Ensure to replace any identifying information with examples. Thank you.
    0
  • the_Dsigner
    ok took a look in the log and found this after doing another attempt... Jun 7 14:54:51 ADMIN01 sshd[14301]: User USER01 from 196.000.00.00 not allowed because not listed in AllowUsers Jun 7 14:54:51 ADMIN01 sshd[14302]: input_userauth_request: invalid user USER01
    0
  • Jcats
    Seems like you are using AllowUsers in ssh grep -i AllowUsers /etc/ssh/sshd_config
    You will want to add that range like so *@196.0.0.0/8
    just add it to the end of the AllowUsers line separating it from the previous CIDR with a space. Also.. *@196.0.0.0/8 allows that entire range, so you may want to specify a smaller range or just define the actual IP address. Once done restart ssh: /scripts/restartsrv_sshd
    0
  • the_Dsigner
    I'm not familiar with the AllowUsers list. Is this something that's setup by default in the SSH?
    0
  • Jcats
    Nope, that is not a default option, its not even mentioned in the config by default. If you don't need/want it, just comment it out but comment out similar lines as well like DenyUsers, AllowUsers, DenyGroups, AllowGroups
    0
  • the_Dsigner
    Thanks. I don't know why that was activated as I don't want to add/remove Cpanel users every time I feel the need to SSH into that account.
    0
  • Jcats
    Yeah would be a pain for sure.
    0
  • the_Dsigner
    Just took a look in my CentOS directory and there is only the ssh_config file, no sshd_config file in /ect/ssh/
    0
  • Jcats
    What does this give you: grep -rli AllowUsers /etc/ssh/
    0
  • cPanelMichael
    Just took a look in my CentOS directory and there is only the ssh_config file, no sshd_config file in /ect/ssh/

    Hello @the_Dsigner, The /etc/sshd_config file should exist. Are you logged in via SSH as root when browsing to the /etc/ directory? Thank you.
    0

Please sign in to leave a comment.