mirror of
https://github.com/splunk/DECEIVE.git
synced 2025-07-01 16:47:28 -04:00
Converted start_server() to more modern idiom granting better control of server parameters.
This commit is contained in:
@ -99,9 +99,15 @@ class MySSHServer(asyncssh.SSHServer):
|
||||
return ((pw != '*') and (password == pw))
|
||||
|
||||
async def start_server() -> None:
|
||||
await asyncssh.create_server(MySSHServer, '', 8022,
|
||||
server_host_keys=['ssh_host_key'],
|
||||
process_factory=handle_client)
|
||||
await asyncssh.listen(
|
||||
port=8022,
|
||||
reuse_address=True,
|
||||
reuse_port=True,
|
||||
server_factory=MySSHServer,
|
||||
server_host_keys=['ssh_host_key'],
|
||||
process_factory=handle_client,
|
||||
server_version="SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3"
|
||||
)
|
||||
|
||||
class ContextFilter(logging.Filter):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user