_                _   _                 ____            _     _ 	
   / \   _ __   ___ | |_| |__   ___ _ __  |  _ \ _ __ ___ (_) __| |	
  / _ \ | '_ \ / _ \| __| '_ \ / _ \ '__| | | | | '__/ _ \| |/ _\` |	
 / ___ \| | | | (_) | |_| | | |  __/ |    | |_| | | | (_) | | (_| |	
/_/   \_\_| |_|\___/ \__|_| |_|\___|_|    |____/|_|  \___/|_|\__,_|	
                                                                bbs
  XQTRs lair...
Home // Blog // NULL emag. // Files // Docs // Tutors // GitHub repo
FTP Server
+++------------------------------------- --  ----  -- - - -   -

Termux provides a lightweight FTP server so you can manage your files 
via remote connection. This server is part of the included busybox 
package, so you don't have to install anything.


Security warning: this FTP server only supports anonymous login, so 
there is no authentication and anyone can connect to your device and do 
nasty things. Use it only in your own network or use SFTP instead.


To start FTP server you have to run `ftpd` via `tcpsvd`:

$ tcpsvd -vE 0.0.0.0 1024 ftpd /

Command shown above will start FTP server on port 1024 from the root 
(`/`) directory.

By default, ftpd is started in read-only mode, i.e. you can only 
download files or perform directory listing. If you want to upload 
files, then ftpd should be started this way:

$ tcpsvd -vE 0.0.0.0 1024 ftpd -w /

Then you can connect to Termux from another device. For example, to 
connect to Termux with a command line FTP client (from PC):

$ ftp 192.168.1.3 1024


You shouldn't start FTP on ports lower than 1024. Trying will give the 
following error message:

tcpsvd: bind: Permission denied

SSH Server
+++------------------------------------- --  ----  -- - - -   -

To start it write:

sshd

To stop it write:

pkill sshd

In termux type ifconfig to get your local ip and remember that you have
to use port 8022 (default for termux).