SSH
- your router: assign a static server ip
- server: install openssh
- Ubuntu:
sudo apt install openssh - Termux:
pkg install openssh
- Ubuntu:
- server: start ssh daemon
- Ubuntu:
sudo systemctl restart ssh - Termux:
sshd
- Ubuntu:
- server: verify password auth is on
- Ubuntu:
/etc/ssh/sshd_config -
Termux
$PREFIX/etc/ssh/sshd_configPasswordAuthentication yes
- Ubuntu:
- client: create an ssh key pair
ssh-keygen -C "your.email@example.com"
- client: add server to config
-
~/.ssh/config``` host enterprise user picard hostname 192.168.1.1701 port 22 ```- termux uses port 8022 by default
- client: copy public key to server
ssh-copy-id enterprise- enter your password when prompted
- client: test success
ssh enterprise
- server: disable password auth
- Ubuntu:
/etc/ssh/sshd_config -
Termux:
$PREFIX/etc/ssh/sshd_configPasswordAuthentication no
- Ubuntu:
- server: restart ssh daemon
- Ubuntu:
sudo systemctl restart ssh - Termux:
pkill sshd && sshd
- Ubuntu:
- profit
TODO
- fix code block bullet formatting
references: Linuxize and Termux Wiki