Author Topic: SSH connection Access Denied  (Read 2062 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
SSH connection Access Denied
« on: June 16, 2023, 03:05:00 AM »
I can login from dashboard (root and pw) but when i login via putty (same root username and pw) then access denied.

reset pw from sever setting-change root pw also same access denied.So,I tried to reset password from my hosting provider panel also same access denied.I am now lost how to get my ssh connection.

I changed SSH port 22 to 2xxx. Everything is working fine except just that ssh have access denied.Therefor,I disable all the firewall,mod security and tried from putty .It is also no luck.very insane cos i can login to cwp dashboard admin panel.

CWP pro and some my own website is already running and websever is Nginx & Varnish & Apache and force to use php fpm.

Is there anyone who have encounter like my problem before?

Really appreciated your comment.

Offline
*
Re: SSH connection Access Denied
« Reply #1 on: June 16, 2023, 09:26:03 PM »
You could restrict root access over SSH in various ways:
1. Allow root access from certain IPs;
2. Block password access and allow key-based access only;
3. root access is allowed over "su"

Did you modified the SSH service settings ? If so then show us content of te config file of your SSH service:
Code: [Select]
/etc/ssh/sshd_config

Offline
****
Re: SSH connection Access Denied
« Reply #2 on: June 17, 2023, 10:53:53 PM »
In the interest of security, I recommend NOT allowing root logins via SSH. Instead, create a non-CWP controlled sudo user with useradd.  Then allow that user SSH access via either of the directives in /etc/ssh/sshd_config below:
Code: [Select]
AllowUsers foo
AlloGroups wheel
PermitRootLogin no
Then you ssh in on your alternate port (good for you!) as the other user, then either one of these will switch you to the root user:
Code: [Select]
su root
sudo -s
(I prefer the latter, as all environmental variables are shared with the newly elevated privileges -- instead of treating root like a separate user that you login as and function as -- you're just you gaining super powers.)

Offline
*
Re: SSH connection Access Denied
« Reply #3 on: June 22, 2023, 01:33:39 AM »
In the interest of security, I recommend NOT allowing root logins via SSH. Instead, create a non-CWP controlled sudo user with useradd.  Then allow that user SSH access via either of the directives in /etc/ssh/sshd_config below:
Code: [Select]
AllowUsers foo
AlloGroups wheel
PermitRootLogin no
Then you ssh in on your alternate port (good for you!) as the other user, then either one of these will switch you to the root user:
Code: [Select]
su root
sudo -s
(I prefer the latter, as all environmental variables are shared with the newly elevated privileges -- instead of treating root like a separate user that you login as and function as -- you're just you gaining super powers.)

good advice !

Offline
*
Re: SSH connection Access Denied
« Reply #4 on: August 03, 2023, 04:26:16 AM »
The only real way to fix any issues with CWP is to stop using CWP and use one of the several much better web control panels.

If you continue to use CWP you will only face continuous issues and spend more time trying to fix CWP's ridiculous issues than focusing on inportant stuff.

These people do not care about their product, or you even in paid versions, so why waste your precious time with them.

Everything in this panel is years outdated, look at the source coding of the panel it self, they haven't fixed basic rudementry web code issues in how many years. The Panel still doesn't have Admin SSL , Installs With Mariadb 10.4 which at the VERY least should be 10.6,NGINX is installs like 10 or more versions behind.

In all fairness, I gave CWP several years trying to like it as many of the concepts are good if they would have ever just updated and removed bugs but in the end I had to face reality and that reality is, STAY THE HELL AWAY FROM CWP.

There are a few free open source panels or very inexpensive panels around that wil give you far less hassle and allow you to work on the really important stuff you should be focusing on instead of your never was / has been web panel!

Offline
****
Re: SSH connection Access Denied
« Reply #5 on: August 03, 2023, 01:55:05 PM »
I'm sorry, but your rant is not very helpful at all and doesn't contribute to solving the original poster's problem.