Whenever I try to run apt-get install openssh-server
I get the following errors:
root@ubuntu-phablet:/home/hablet# apt-get install openssh-server
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt
E: The package lists or status file could not be parsed or opened.
Best Answer
With the official final release Ubuntu for Phones ships the "android-gadget-service" tool with which you can manage adb, mtp, USB tethering and ssh.
Connect your device via USB, enable Developer Mode in:
"System-Settings->About This Phone->Developer Mode"
...and run (from your PC, make sure to have the phone screen unlocked, else adb will refuse to let you in):
Copy your public key to the Phone:
Now you can look up your IP on the phone and use ssh to connect: