Skip to content

Commit

Permalink
Fix: Fix setting the port for the SSH connection #818
Browse files Browse the repository at this point in the history
fix:the ssh port should not be constant
  • Loading branch information
bjoernricks committed Aug 25, 2022
2 parents 3d1f40d + 8a5c29d commit 9784cf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gvm/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def _get_remote_host_key(self):
"""Get the remote host key for ssh connection"""
try:
tmp_socket = socketlib.socket()
tmp_socket.connect((self.hostname, 22))
tmp_socket.connect((self.hostname, self.port))
except OSError as e:
raise GvmError(
"Couldn't establish a connection to fetch the"
Expand Down

0 comments on commit 9784cf5

Please sign in to comment.