carletes / mock-ssh-server

Python mock SSH server for testing purposes
MIT License
56 stars 32 forks source link

Add support for multiple keytype for user #11

Closed swiatek25 closed 4 years ago

swiatek25 commented 4 years ago

Right now server accepts only RSA keys for users. I added add_user method extension to support different key types. Extension is somehow quick and dirty because of backwards compatibility issues that may arise from more comprehensive support.

So after this change usage is quite similar to previous one, i.a:

 with mockssh.Server(users) as s:
        s.add_user(sftp_user, sftp_pkey, 'ssh-ed25519')
        yield s

Note the last argument to explicit add_user call.

carletes commented 4 years ago

Thanks, @swiatek25! I just merged this (thanks to @mvdbeek for the review, too!)

I'm preparing a release to PyPI now.

carletes commented 4 years ago

@swiatek25: I've added you to the list of collaborators of this project. For future pull requests, if you do not hear from me within one week (or from any other collaborator), and all tests pass for your PR, just go ahead and merge your PR into master.

If you have a PyPI handle, please give it to me, so that I may also add yourself as an uploader to PyPI. That way you'l lalso be able to publish new versions of this package in case I am not around.

swiatek25 commented 4 years ago

Hi, just created PyPi account. My handle is soltar. Thanks for accepting the PR.

Best,

carletes commented 4 years ago

Thanks, Michał! I hadd you as a maintainer of https://pypi.org/manage/project/mock-ssh-server

For future PRs: If the Travis builds are OK, and you don't hear from me or from the other maintainers (@mvdbeek and @mroutis) within one week, just go ahead, merge them into master and publish them to PyPI.