New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

CWP to CWP migration does not connect

Started by adrianofnatal, May 28, 2024, 06:32:20 PM

Previous topic - Next topic

SSM


sundar rajamani

Quote from: adrianofnatal on June 10, 2024, 07:17:26 PM
Hi all.

I got this working.

In old (origin) server had following block to enable the user root to login with password in file sshd_config:

Match User root
   PubkeyAuthentication no
   PasswordAuthentication yes
   PermitRootLogin yes

Without success and without any additional information on /var/log/secure log.

Searching on the internet I see this parameter and enabled it on sshd_config:

ChallengeResponseAuthentication yes

Without success too but with addicional log telling me:

pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"

The user root is 0, always. So strange.
Searching on internet again I see this site https://www.ezeelogin.com/kb/article/sshd3167-pam_succeed_if-40;sshdauth-41;-requirement-uid-=-1000-not-met-by-user-root-306.html showing to enable root login by IP with bellow block on sshd_config file:

Match Address NEW_SERVER_IP
       PermitRootLogin yes
       PubkeyAuthentication no
       PasswordAuthentication yes

Done this, restarted SSHD and connection was successful.

Here is the solution in case anyone facing this problem too.

Thanks you all for help!

If i add match address ip sshd cant restart

overseer

Just omit that stanza in your SSH config. Good to lock things down after it is set up & working, but securing things prematurely will hinder your setup or potentially lock you at.

sundar rajamani

#18
whch stanza r u saying and kindly help more than 48hrs am trying cwp migration both server are almalinux 8 only followed the procedure properly but getting msg connection not reached this error occured and source side amd getting this error msg

Jan 29 23:11:09 cwp.s4hosting.in sshd[87946]: error: PAM: Authentication failure for root from xxxxxxx
Jan 29 23:11:09 cwp.s4hosting.in sshd[87951]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ss>
Jan 29 23:11:12 cwp.s4hosting.in sshd[87946]: error: PAM: Authentication failure for root from xxxxxxx
Jan 29 23:11:12 cwp.s4hosting.in sshd[87960]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ss>
Jan 29 23:11:13 cwp.s4hosting.in sshd[87946]: error: PAM: Authentication failure for root from xxxxxxxx
Jan 29 23:11:13 cwp.s4hosting.in sshd[87946]: Failed password for root from xxxxxxxxxx port 58902 ssh2
Jan 29 23:11:13 cwp.s4hosting.in sshd[87946]: Failed password for root from xxxxxxxxxxx port 58902 ssh2
Jan 29 23:11:13 cwp.s4hosting.in sshd[87946]: Connection closed by authenticating user root xxxxxxxx port 58902 [>
Jan 29 23:14:20 cwp.s4hosting.in sshd[88181]: Accepted keyboard-interactive/pam for root from xxxxxxxx port 14457 >
Jan 29 23:14:21 cwp.s4hosting.in sshd[88181]: pam_unix(sshd:session): session opened for user root by (uid=0)

sundar rajamani

Quote from: sundar rajamani on January 29, 2025, 05:45:47 PM
whch stanza r u saying and kindly help more than 48hrs am trying cwp migration both server are almalinux 8 only followed the procedure properly but getting msg connection not reached this error occured and source side amd getting this error msg

Jan 29 23:11:09 cwp.s4hosting.in sshd[87946]: error: PAM: Authentication failure for root from xxxxxxx
Jan 29 23:11:09 cwp.s4hosting.in sshd[87951]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ss>
Jan 29 23:11:12 cwp.s4hosting.in sshd[87946]: error: PAM: Authentication failure for root from xxxxxxx
Jan 29 23:11:12 cwp.s4hosting.in sshd[87960]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ss>
Jan 29 23:11:13 cwp.s4hosting.in sshd[87946]: error: PAM: Authentication failure for root from xxxxxxxx
Jan 29 23:11:13 cwp.s4hosting.in sshd[87946]: Failed password for root from xxxxxxxxxx port 58902 ssh2
Jan 29 23:11:13 cwp.s4hosting.in sshd[87946]: Failed password for root from xxxxxxxxxxx port 58902 ssh2
Jan 29 23:11:13 cwp.s4hosting.in sshd[87946]: Connection closed by authenticating user root xxxxxxxx port 58902 [>
Jan 29 23:14:20 cwp.s4hosting.in sshd[88181]: Accepted keyboard-interactive/pam for root from xxxxxxxx port 14457 >
Jan 29 23:14:21 cwp.s4hosting.in sshd[88181]: pam_unix(sshd:session): session opened for user root by (uid=0)

I have succeeded after 2 days of head brake the problem is in private key id_rsa permission issue it was  in 644 and changed to 600 after so many reasearches and studies of sshd config......