If you turn on your phone's hotspot and connect your PC to that, it's less fiddly (and also faster!). Your phone's IP on its own hotspot will always be 192.168.43.1 so you can put that in your ~/.ssh/config:
Host android
HostName 192.168.43.1
IdentityFile /path/to/keyfile
Port 22 # or something else
View all comments
Show parent comment
2
u/190n Jul 31 '18
If you turn on your phone's hotspot and connect your PC to that, it's less fiddly (and also faster!). Your phone's IP on its own hotspot will always be 192.168.43.1 so you can put that in your ~/.ssh/config:
(make sure to change spaces to tabs)
Then you can just run: