-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adding support to launch MAPDL on remote HPC clusters #3713
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
|
||
def __enter__(self): | ||
self.session = SSHClient() | ||
self.session.set_missing_host_key_policy(paramiko.AutoAddPolicy()) |
Check failure
Code scanning / CodeQL
Accepting unknown SSH host keys when using Paramiko High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 12 days ago
To fix the problem, we need to change the missing host key policy from AutoAddPolicy
to RejectPolicy
. This ensures that the SSH connection will only be established if the host key is already known and trusted, thereby preventing potential man-in-the-middle attacks.
- Change the
set_missing_host_key_policy
method call to useRejectPolicy
instead ofAutoAddPolicy
. - Ensure that the
paramiko.RejectPolicy
is imported if it is not already.
-
Copy modified line R27 -
Copy modified line R390
@@ -26,3 +26,3 @@ | ||
import paramiko | ||
from paramiko.client import SSHClient | ||
from paramiko.client import SSHClient, RejectPolicy | ||
|
||
@@ -389,3 +389,3 @@ | ||
self.session = SSHClient() | ||
self.session.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | ||
self.session.set_missing_host_key_policy(paramiko.RejectPolicy()) | ||
self.session.connect( |
...
HIGHLY UNDER DEVELOPMENT!!
Description
As the title.
Notes
Mapdl
andjob
(object to query/manage the HPC job status)Example
Issue linked
NA
Checklist
draft
if it is not ready to be reviewed yet.feat: adding new MAPDL command
)