Author Topic: CWP to CWP migration does not connect  (Read 1715 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
Re: CWP to CWP migration does not connect
« Reply #15 on: January 09, 2025, 01:08:36 PM »
disable firewall both server

Offline
*
Re: CWP to CWP migration does not connect
« Reply #16 on: January 29, 2025, 08:54:41 AM »
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

Offline
*****
Re: CWP to CWP migration does not connect
« Reply #17 on: January 29, 2025, 04:38:49 PM »
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.

Offline
*
Re: CWP to CWP migration does not connect
« Reply #18 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)
« Last Edit: January 29, 2025, 06:29:02 PM by sundar rajamani »

Offline
*
Re: CWP to CWP migration does not connect
« Reply #19 on: January 30, 2025, 01:00:54 AM »
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......