Skip to content

Commit 8408809

Browse files
committed
doc/configuration: document optional SSH username handling
Clarify that `NetworkService.username` is optional. If no username is configured on `NetworkService` or `SSHDriver`, labgrid lets SSH resolve the username through the local SSH configuration or the default SSH user selection. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
1 parent a0383c0 commit 8408809

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

doc/configuration.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,8 @@ A :any:`NetworkService` describes a remote SSH connection.
698698
699699
The example describes a remote SSH connection to the computer
700700
``example.computer`` with the username ``root``.
701+
If ``username`` is omitted, labgrid will let SSH resolve the username through
702+
the local SSH configuration or the default SSH user selection.
701703
Set the optional password password property to make SSH login with a password
702704
instead of the key file.
703705

@@ -710,7 +712,7 @@ These and the sudo configuration needs to be prepared by the administrator.
710712

711713
Arguments:
712714
- address (str): hostname of the remote system
713-
- username (str): username used by SSH
715+
- username (str, default=None): optional, username used by SSH
714716
- password (str, default=None): optional, password used by SSH
715717
- port (int, default=22): port used by SSH
716718

@@ -2091,7 +2093,9 @@ Arguments:
20912093
will explicitly use the SFTP protocol for file transfers instead of scp's default protocol
20922094
- explicit_scp_mode (bool, default=False): if set to True, ``put()``, ``get()``, and ``scp()``
20932095
will explicitly use the SCP protocol for file transfers instead of scp's default protocol
2094-
- username (str, default=username from `NetworkService`_): username used by SSH
2096+
- username (str, default=username from `NetworkService`_): optional, username used by SSH
2097+
If neither `SSHDriver`_ nor `NetworkService`_ specifies a username, SSH's
2098+
own username resolution is used.
20952099
- password (str, default=password from `NetworkService`_): password used by SSH
20962100

20972101
UBootDriver

0 commit comments

Comments
 (0)