Skip to content

Commit 4a927bc

Browse files
FelipeMdeOacassis
authored andcommitted
Documentation/applications: document Dropbear scp file transfers
Document how to transfer files with scp on the Dropbear server port, which requires the legacy protocol (scp -O) since the port has no SFTP server. Recent OpenSSH clients default to SFTP and fail otherwise. Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
1 parent e0b4eb7 commit 4a927bc

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

  • Documentation/applications/netutils/dropbear

Documentation/applications/netutils/dropbear/index.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,35 @@ Then open an SSH session from a host on the same network::
7777
<username>@<ip_address>'s password:
7878
nsh>
7979

80+
File transfer with scp
81+
----------------------
82+
83+
When ``CONFIG_NETUTILS_DROPBEAR_SCP`` is enabled (default ``y``, requires
84+
``CONFIG_PIPES=y``), Dropbear's ``scp`` program is built as a builtin
85+
application and the server accepts SSH ``exec`` requests, allowing files to
86+
be copied to and from the board with a standard ``scp`` client.
87+
88+
The port implements only the legacy scp protocol. OpenSSH 9.0 and later
89+
default to the SFTP protocol, which is not supported by this port, so a
90+
plain ``scp`` invocation from a recent Linux distribution fails. Pass the
91+
``-O`` flag to force the legacy scp protocol.
92+
93+
Copy a file from the host to the board::
94+
95+
$ scp -O <file> <username>@<ip_address>:/data/<file>
96+
97+
Copy a file from the board back to the host::
98+
99+
$ scp -O <username>@<ip_address>:/data/<file> .
100+
101+
When Dropbear listens on a non-default port, add ``-P <port>``::
102+
103+
$ scp -O -P 2222 <file> <username>@<ip_address>:/data/<file>
104+
105+
Transfers must always be initiated from the host. Running ``scp`` on the
106+
target to push or pull files from another machine is not supported, since
107+
the port does not include an SSH client.
108+
80109
Notes
81110
-----
82111

@@ -120,6 +149,13 @@ Remove the stale entry with::
120149

121150
Then reconnect normally. The client will prompt to accept the new host key.
122151

152+
**scp fails with "subsystem request failed" or "Connection closed"**
153+
154+
Recent OpenSSH clients use the SFTP protocol by default, which this port
155+
does not support. Retry forcing the legacy scp protocol::
156+
157+
$ scp -O <file> <username>@<ip_address>:/data/<file>
158+
123159
**Connection refused**
124160

125161
Check that the board has obtained an IP address and that the Dropbear task is

0 commit comments

Comments
 (0)