Skip to content

Commit

Permalink
ssh: add support for key and disabled_algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-sahlmann committed Jan 24, 2023
1 parent 003b157 commit 34394bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mb_netmgmt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with mb-netmgmt. If not, see <https://www.gnu.org/licenses/

"""Network Management Protocols for Mountebank"""
__version__ = "0.0.54"
__version__ = "0.0.55"

import os
import subprocess
Expand Down
7 changes: 6 additions & 1 deletion mb_netmgmt/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ def open_upstream(self):
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy)
client.connect(
to.hostname, to.port or self.default_port, to.username, to.password
to.hostname,
to.port or self.default_port,
to.username,
to.password,
key_filename=self.keyfile.name,
transport_factory=paramiko.Transport,
)
transport: paramiko.Transport = client._transport
self.upstream_channel = transport.open_session()
Expand Down

0 comments on commit 34394bf

Please sign in to comment.