Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
pytest --cov src
coverage html
- name: Archive code coverage html report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: htmlcov/
overwrite: true
6 changes: 3 additions & 3 deletions src/splitcopy/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,14 @@ def which_sshd(self):
logger.info("entering which_sshd()")
result, stdout = self.ssh_cmd("sshd -v", exitcode=False, combine=True)
if self.use_shell:
if not re.search(r"OpenSSH_", stdout):
if not re.search(r"OpenSSH_|JSSH_", stdout):
self.close(err_str="failed to determine remote openssh version")
output = stdout.split("\n")[2]
else:
if not re.search(r"OpenSSH_", stdout):
if not re.search(r"OpenSSH_|JSSH_", stdout):
self.close(err_str="failed to determine remote openssh version")
output = stdout.split("\n")[1]
version = re.sub(r"OpenSSH_", "", output)
version = re.sub(r"OpenSSH_|JSSH_", "", output)
sshd_version = float(version[0:3])
return sshd_version

Expand Down
4 changes: 4 additions & 0 deletions src/splitcopy/tests/test_paramikoshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ def from_private_key_file(filename):
with raises(PasswordRequiredException):
paramikoshell.get_pkey_from_file("EC", "/homes/foo/.ssh/bar")

import paramiko
import pytest
dss_key_available = hasattr(paramiko, "DSSKey")
@pytest.mark.skipif(not dss_key_available, reason="paramiko.DSSKey not available (removed in paramiko 3.x)")
def test_get_pkey_from_file_dsa(self, monkeypatch: MonkeyPatch):
def from_private_key_file(filename):
return "dsa key"
Expand Down
Loading