- Get your local IP address
$ ip route
default via IP1 dev wlan0 proto dhcp src IP2 metric 600
IP3/24 dev wlan0 proto kernel scope link src IP2 metric 600Copy the second one (IP2), the first (ending with .1) is probably the router (if you connect to it you might see errors with dropbearssh).
- Make sure you have a ssh server running
$ sudo systemctl start sshd- Generate a new ssh key, and preferably choose a passphrase
$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/decide_a_key_name_here
- (Optional) Add an entry to your
~/.ssh/configto ease connecting to the server
Host ALIAS
User USER
Hostname REMOTE-IP
IdentityFile ~/.ssh/the_key_name_you_ve_decided- Copy the public key to the server
$ ssh-copy-id [remote-user]@[remote-ip] # or ssh-copy-id ALIAS- To connect
$ ssh [remote-user]@[remote-ip] # or ssh ALIAS
Thanks @isinyaaa for the help 🙏
This tutorial wouldn't be possible without her 🐱