Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| doc:howto:sftp.server [2015/12/28 15:00] – [SFTP server] probono | docs:guide-user:services:nas:sftp.server [2023/10/14 05:25] (current) – use service invocation vgaetera | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== SFTP server ====== | ====== SFTP server ====== | ||
| + | {{section> | ||
| - | Some clients, e.g. GNOME Files or [[https:// | + | ===== Introduction ===== |
| + | * This how-to describes the method for setting up [[wp> | ||
| + | * It relies on [[docs: | ||
| + | * You can use any suitable [[docs:guide-user: | ||
| - | # Enable sftp, work around https://trac.cyberduck.io/ | + | ===== Goals ===== |
| - | | + | * Transfer files to/from the router. |
| - | | + | |
| + | | ||
| - | Now you can use sftp clients such as GNOME Files or Cyberduck to connect to the OpenWrt system. Note that no additional startup scripts are required since all of that is handled by dropbear which is most likely already present on your system. | + | ===== Instructions ===== |
| + | The SSH File Transfer (SFTP) is a file transfer protocol that works over SSH. It's like SCP but has more features. | ||
| + | For a basic usage the low level SCP may be enough but if you need, for example, to mount drive then use the SFTP. | ||
| - | ===== Announce | + | The vanilla OpenWrt out of the box has a small [[docs: |
| + | But it doesn' | ||
| + | The package comes from another OpenSSH server which is bigger but has more features and default | ||
| + | Many [[docs: | ||
| + | So for this routers you really don't need anything to do and just start using it. | ||
| + | But if not then install the required package: | ||
| - | If you would like to announce | + | <code bash> |
| - | | + | opkg update |
| - | /etc/init.d/announce enable | + | opkg install openssh-sftp-server |
| - | /etc/init.d/announce start | + | </ |
| - | + | ||
| - | announce will notice that openssh-sftp-server is present | + | ===== Testing ===== |
| + | Enter the following URL in your SFTP client. | ||
| + | |||
| + | <code bash> | ||
| + | sftp:// | ||
| + | </ | ||
| + | |||
| + | ==== Clients ==== | ||
| + | * Windows: [[docs: | ||
| + | * Windows: [[https:// | ||
| + | * Linux, macOS, FreeBSD: [[https:// | ||
| + | * Linux, macOS, FreeBSD: [[https:// | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | * macOS: [[https:// | ||
| + | * Android: [[https:// | ||
| + | * Android TV, RapberryPI: [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Troubleshooting ===== | ||
| + | Collect and analyze | ||
| + | |||
| + | <code bash> | ||
| + | # Restart services | ||
| + | service log restart; service dropbear restart | ||
| + | |||
| + | # Log and status | ||
| + | logread -e dropbear; netstat -l -n -p | grep -e dropbear | ||
| + | |||
| + | # Runtime configuration | ||
| + | pgrep -f -a dropbear | ||
| + | |||
| + | # Persistent configuration | ||
| + | uci show dropbear | ||
| + | ls -l / | ||
| + | ls -l $(opkg files openssh-sftp-server | grep -e ^/) | ||
| + | </ | ||
| + | |||
| + | ===== Extras ===== | ||
| + | |||
| + | ==== Service discovery ==== | ||
| + | You may want to provide | ||
| + | |||
| + | <code bash> | ||
| + | opkg update | ||
| + | opkg install announce | ||
| + | </ | ||
| + | |||
| + | See also [[docs: | ||