diff --git a/knowledge base/ubports.md b/knowledge base/ubports.md new file mode 100644 index 0000000..1641a3b --- /dev/null +++ b/knowledge base/ubports.md @@ -0,0 +1,69 @@ +# ubports + +1. [TL;DR](#tldr) +1. [Connect using SSH](#connect-using-ssh) +1. [Sources](#sources) + +## TL;DR + +```sh +# List containers. +libertine-container-manager list + +# Create containers. +# Default type: 'chroot'. +libertine-container-manager create -i 'identifier' +libertine-container-manager create -i 'identifier' -n 'name' -t 'lxc' + +# Destroy containers. +libertine-container-manager destroy -i 'identifier' +``` + +## Connect using SSH + +> SSH is configured to allow only public key-based access. + +1. Open the terminal application. +1. Download, receive or otherwise write the public key on your device: + + ```sh + wget 'https://some.reachable.url/key.pub' + ``` + +1. Copy the key to the `authorized_keys` file; start from the following commands: + + ```sh + mkdir "${HOME}/.ssh" + chmod 700 "${HOME}/.ssh" + cat "${HOME}/key.pub" >> "${HOME}/.ssh/authorized_keys" + chmod 600 "${HOME}/.ssh/authorized_keys" + ``` + +1. Start SSH: + + ```sh + # On Android-based devices (like the OnePlus One). + sudo android-gadget-service enable ssh + + # On Linux-based devices (like the PinePhone). + sudo service ssh start + ``` + +1. Optionally, find the device's IP address: + + ```sh + hostname -I + ``` + +1. Finally, connect from a device using the private key and the `phablet` user: + + ```sh + ssh -i 'path/to/private.key' 'phablet@ubuntu-phablet.lan' + ``` + +## Sources + +- [Documentation] + + +[documentation]: https://docs.ubports.com/en/latest/index.html