mirror of
https://github.com/ChrisSewell/DECEIVE.git
synced 2025-07-01 18: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))
|
return ((pw != '*') and (password == pw))
|
||||||
|
|
||||||
async def start_server() -> None:
|
async def start_server() -> None:
|
||||||
await asyncssh.create_server(MySSHServer, '', 8022,
|
await asyncssh.listen(
|
||||||
server_host_keys=['ssh_host_key'],
|
port=8022,
|
||||||
process_factory=handle_client)
|
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):
|
class ContextFilter(logging.Filter):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user