Setup termux for ssh, scripts, tasker/macrodroid integration
Note If secure Google accounts are active on the device, it is not possible to install apps from Fdroid Store
- Termux
- Termux:API
- Termux:Widget
- Termux:Tasker
- Open Macrodroid and grant all permissions
- Grant Macrodroid permission to run termux scripts: Apps > Macrodroid > Permisisons > Additional Permissions > Run commands in Termux
pkg update; pkg upgrade
pkg install vim netcat-openbsd rsync zsh git python3 termux-api
$ pkg install openssh
- generate a password:
password
- Generate & distribute keys
$ ssh-keygen
- distribute
~/.ssh/id_rsa.pub
as needed (add to github) - Add authorized keys to termux
$ nano ~/.ssh/authorized_keys
- add keys from remote hosts as needed
- generate key for rrsync
$ ssh-keygen -f ~/.ssh/rrsync_media-server_id_rsa
- disable password authentication:
vim $PREFIX/etc/ssh/sshd_config
-- PasswordAuthentication no
- Grant termux permission to "Appear on top" of other apps:
- Settings > Apps > Termux > Appear on top > On
- Setup storage -- this is best done from the device to trigger the permissions dialog
termux-setup-storage
- Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- clone and setup Dotfiles:
pip3 install dotfiles
git clone dotfiles_repo
ln ~/Dotfiles/dotfilesrc .dotfilesrc
dotfiles -s --force
- clone shell scripts
git clone scripts repo
- Move scripts into ~/.shortcuts and setup symbolic links
mv androidScripts ~/.shortcuts; chmod 0700 ./.shortcuts
ln -s ~/.shortcuts/ bin; ln -s ~/.shorctus/ ~/ scripts
- Create symlink for tasker:
* cd ~/.termux/; rm ./tasker; ln -s ~/.shortcuts ./tasker
Sometimes the termux jobs cannot locate the tasker plugin paths and the actions need to updated.
- Open macro
- Under actions locate the "Termux Shortcut"
- Touch "+" > Applications > Tasker > Termux:Tasker > Event
- Enter the script name and touch save
- If no scripts appear the sympling between ~/.shortcuts and ~/.termux/tasker us borked. Fix it.