fix: enable zero-auth SSH connections

- Return False from begin_auth to skip authentication
- Users can connect instantly without password/key prompts
- Frictionless: just ssh play@shellmate.sh
This commit is contained in:
Greg Hendrickson
2026-01-27 18:01:48 +00:00
parent 795fb73734
commit b9eff6705d

View File

@@ -27,23 +27,17 @@ class ShellMateSSHServer(asyncssh.SSHServer):
def begin_auth(self, username: str) -> bool: def begin_auth(self, username: str) -> bool:
self._username = username self._username = username
# Allow all usernames, we'll handle auth in the app # Return False = auth complete (no auth required)
return True # This allows instant passwordless connections
return False
def password_auth_supported(self) -> bool: def password_auth_supported(self) -> bool:
return True # Not needed since we skip auth entirely
return False
def validate_password(self, username: str, password: str) -> bool:
# Guest access - accept any password or empty
# For registered users, validate against database
return True # TODO: Implement proper auth
def public_key_auth_supported(self) -> bool: def public_key_auth_supported(self) -> bool:
return True # Not needed since we skip auth entirely
return False
def validate_public_key(self, username: str, key: asyncssh.SSHKey) -> bool:
# Accept any public key for now
return True # TODO: Implement key-based auth
async def handle_client(process: asyncssh.SSHServerProcess) -> None: async def handle_client(process: asyncssh.SSHServerProcess) -> None: