-
Notifications
You must be signed in to change notification settings - Fork 143
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
'SSHServerConnectionOptions' object has no attribute 'server_factory' ???? #588
Comments
I have a few questions regarding the usage of the SSHServerConnectionOptions class while learning to use the asyncssh library:
|
Good catch! On the first issue you mention about the type of server_factory, the correct type is a callable that returns When it comes to the In the specific case of The It actually looks like the client_factory argument in |
Thank you for your answer, I understand now |
Thanks - I'm glad you're finding it useful! If you have any other questions about it, feel free to ask... |
my code is:
server_ops: asyncssh.SSHServerConnectionOptions = asyncssh.SSHServerConnectionOptions(
server_factory = demo_ssh_server,
server_version = 'DEMO-TEST-AsyncSSH_2.13.1', # 自定义服务器 SSH 协议版本名称
server_host_keys = ['/xxxx/id_rsa'],
)
print(server_ops.server_factory)
and I got error:
AttributeError: 'SSHServerConnectionOptions' object has no attribute 'server_factory'. Did you mean: 'session_factory'?
In source code asyncssh/connection.py I got:
:param server_factory:
A
callable
which returns an :class:SSHServer
object that willbe created for each new connection.
:type server_factory:
callable
returning :class:SSHServerConnection
my asyncssh version is 2.13.1
Python 3.11.3
The text was updated successfully, but these errors were encountered: