https://github.com/rishabhrpg/sshd-in-termux
SSH Into Termux
https://github.com/rishabhrpg/sshd-in-termux
Last synced: 11 months ago
JSON representation
SSH Into Termux
- Host: GitHub
- URL: https://github.com/rishabhrpg/sshd-in-termux
- Owner: rishabhrpg
- Created: 2021-01-10T17:03:26.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-10T17:20:37.000Z (over 5 years ago)
- Last Synced: 2025-06-18T02:38:15.241Z (about 1 year ago)
- Size: 1.95 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSH Into Termux (SSHD)
Scripts and notes for setting up and using SSHd on your Android device using Termux so that you can SSH, SFTP, and SSHFS to your Android
# On your AndroidOS device
Install Termux (https://termux.com/)
Launch Termux
Enter these commands (In Android)
> apt update
> apt upgrade
> termux-setup-storage
> apt install openssh
> touch ~/.ssh/authorized_keys
> chmod 600 ~/.ssh/authorized_keys
> chmod 700 ~/.ssh
> ssh-keygen
> cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
> chmod 600 ~/.ssh/authorized_keys
In your remote device
ssh-keygen ( if you don't already have a ssh key-pair )
cat id_rsa.pub
copy everything from the output and send it to Android Device now the content needs to be pasted into `~/.ssh/authorized_keys` inside termux.
Now do `sshd` in termux to start the server.
# To SSH into Android from the Remote Host
Type this command from within a Terminal
> ssh -p 8022 IPofYourAndroid
# To SFTP into Android from the Remote Host
Type this command from within a Terminal
> sftp -P 8022 IPofYourAndroid
## References
(https://github.com/tomhiggins/TermuxSSHDsetup)