There is a check in RH124/c19/s5 performing a `sed` command which blindly assumes that the user just commented out the authentication line, rather than configuring `PasswordAuthentication=no`. This leads to the grading passing but the script `finish` step failing.
---
root@serverb: COMMAND:
if [ -f /etc/ssh/sshd_config.d/50-cloud-init.conf ]; then sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config.d/50-cloud-init.conf && systemctl reload sshd.service; else echo 'File /etc/ssh/sshd_config.d/50-cloud-init.conf not present, moving on...'; fi
2025-08-29 23:06:36,014:ssh-review:INFO:transport.py(1938) Connected (version 2.0, client OpenSSH_9.9)
2025-08-29 23:06:36,082:ssh-review:INFO:transport.py(1938) Authentication (publickey) failed.
2025-08-29 23:06:36,098:ssh-review:INFO:transport.py(1938) Authentication (publickey) failed.
2025-08-29 23:06:36,099:ssh-review:ERROR:step.py(54) Step 'Restoring password authentication on serverb' has failed.
Traceback (most recent call last):
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/labs/common/commands/__init__.py", line 48, in ssh_run_command_step
process = ssh_run_command(command, host, user)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/labs/common/commands/__init__.py", line 177, in ssh_run_command
o = c.run(command, hide=True, warn=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/decorator.py", line 235, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/fabric/connection.py", line 22, in opens
self.open()
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/fabric/connection.py", line 665, in open
result = self.client.connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 483, in connect
self._auth(
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 814, in _auth
raise saved_exception
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 751, in _auth
self._transport.auth_publickey(username, key)
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/transport.py", line 1703, in auth_publickey
return self.auth_handler.wait_for_response(my_event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/auth_handler.py", line 263, in wait_for_response
raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.
==== End of logs ====
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 483, in connect
self._auth(
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 814, in _auth
raise saved_exception
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 751, in _auth
self._transport.auth_publickey(username, key)
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/transport.py", line 1703, in auth_publickey
return self.auth_handler.wait_for_response(my_event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/auth_handler.py", line 263, in wait_for_response
raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.
2025-08-29 23:06:35,877:ssh-review:INFO:lablog.py(229) #################### ssh-review ####################
2025-08-29 23:06:35,999:ssh-review:INFO:__init__.py(175)
root@serverb: COMMAND:
if [ -f /etc/ssh/sshd_config.d/50-cloud-init.conf ]; then sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config.d/50-cloud-init.conf && systemctl reload sshd.service; else echo 'File /etc/ssh/sshd_config.d/50-cloud-init.conf not present, moving on...'; fi
2025-08-29 23:06:36,014:ssh-review:INFO:transport.py(1938) Connected (version 2.0, client OpenSSH_9.9)
2025-08-29 23:06:36,082:ssh-review:INFO:transport.py(1938) Authentication (publickey) failed.
2025-08-29 23:06:36,098:ssh-review:INFO:transport.py(1938) Authentication (publickey) failed.
2025-08-29 23:06:36,099:ssh-review:ERROR:step.py(54) Step 'Restoring password authentication on serverb' has failed.
Traceback (most recent call last):
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/labs/common/commands/__init__.py", line 48, in ssh_run_command_step
process = ssh_run_command(command, host, user)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/labs/common/commands/__init__.py", line 177, in ssh_run_command
o = c.run(command, hide=True, warn=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/decorator.py", line 235, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/fabric/connection.py", line 22, in opens
self.open()
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/fabric/connection.py", line 665, in open
result = self.client.connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 483, in connect
self._auth(
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 814, in _auth
raise saved_exception
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/client.py", line 751, in _auth
self._transport.auth_publickey(username, key)
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/transport.py", line 1703, in auth_publickey
return self.auth_handler.wait_for_response(my_event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/student/.cache/uv/archive-v0/XYCzndfxs1nhKP3v3Xwif/lib/python3.11/site-packages/paramiko/auth_handler.py", line 263, in wait_for_response
raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.
I'm guessing this is the same (unfixed) problem as this thread
https://learn.redhat.com/t5/RH124-Red-Hat-System/RH124-ch10s07-lab-finish-ssh-review-fails/m-p/48258
@0x000000ff just to confirm this is from v10 course right ?
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.