Skip to content

Commit 8c94ef3

Browse files
committed
empty --password '' for ssh
1 parent fce5adb commit 8c94ef3

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ SSH server
9999
It is possible to serve the emulation through SSH. Clients with terminals supporting the [kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) can send input directly without X11 forwarding. Otherwise, X11 forwarding (`ssh -X`) can be used as a fallback. Use `gambaterm-ssh --help` for more information. 24-bit color is always assumed over SSH. Audio is not available over SSH.
100100

101101
```shell
102-
$ gambaterm-ssh --password 123 myrom.gbc
103-
$ gambaterm-ssh --password 123 --bind 0.0.0.0 --port 8022 myrom.gbc # Listen on all interfaces
102+
$ gambaterm-ssh --password '' myrom.gbc # with no password (press return if prompted)
103+
$ gambaterm-ssh --password '' --bind 0.0.0.0 --port 8022 myrom.gbc # Listen on all interfaces
104104
```
105105

106106
Connect with ssh client:

gambaterm/ssh.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ def session_requested(self) -> SSHServerProcess[str]:
267267
)
268268

269269
def password_auth_supported(self) -> bool:
270-
return bool(self._gambaterm_password)
270+
# Allow empty string as a valid password (--password ''),
271+
# only None (unset) disables password auth.
272+
return self._gambaterm_password is not None
271273

272274
def validate_password(self, username: str, password: str) -> bool:
273275
assert self._gambaterm_password is not None

0 commit comments

Comments
 (0)