How to setup default user directory for SFTP when connecting to Termux SSH? #4297
Unanswered
AntonSamokat
asked this question in
Q&A
Replies: 1 comment
-
It is strange but
option in
added useful behavior: Now in /data/data/com.termux/files/home/ can be created links to internal and external storages for fast navigation.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to make SFTP connection settings more user friendly -- more short. When I connect to Termux by SFTP I want to be able to browse internal and external (SD Card) storages of the device. In SFTP connection settings I want only to write something short: for example, device-ip:port without mentioning full long path to Termux directory /data/data/com.termux/files/home/ftp. The last 'ftp' folder is my custom folder which contains symbolic links to internal storage (/sotrage/emulated/0) and to external storage (/storage/SD-CARD-ID) -- for fast navigation to needed places.
How to achieve this? I see 3 possible solutions.
to setup default user folder mentioned there command is:
I tried this approach and has not succeeded.
In
/data/data/com.termux/files/usr/etc/ssh/sshd_config
I tried the following command:
with assumption that root starts with / and performing chroot is not necessary.
Second approach is to make custom directory with short name near the root, for example /ftp to be accessible from Termux user. Most likely this is not possible because of permission architecture of Android.
Related question
https://android.stackexchange.com/questions/217741/how-to-bind-mount-a-folder-inside-sdcard-with-correct-permissions
Connect by SFTP to Termux SSH with root user. As I understand this is prohibited in Termux and is not recommended because of understandable security risks.
Is it still possible to achieve this somehow?
Beta Was this translation helpful? Give feedback.
All reactions