Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.
share|improve this question
Exactly the same error –  user195123 Sep 22 '13 at 14:10
Same error for me doing same thing - ubuntu 11.04. –  Malee Sep 22 '13 at 14:13
@Malee 11.04 is end of life, you can't get help for 11.04 here because of that. Upgrade to 12.04 or newer, or to a supported release, and then we can help you fix it. –  Thomas W. Sep 22 '13 at 16:35
Ubuntu touch does not have the software center yet and updating is terminal only, which i did not do as i tried to install openssh. –  user195123 Sep 22 '13 at 17:47
Ok since i did not change too much yet, do you think formatting my storage and reflashing ubuntu helps? –  user195123 Sep 22 '13 at 19:00

2 Answers 2

OpenSSH server is now (as of 13-Sep-2013) pre-loaded with Ubuntu Touch install.

However, it is also disabled by default.

You also don't want SSH operating from root.

You need to type the following, using a USB connection to the device:

adb shell

su - phablet

echo | sudo tee /etc/init/ssh.override

To revert to disabled

echo "manual" | sudo tee /etc/init/ssh.override

UPDATE: (09-Mar-2014)

The answer above is no longer current.

  • As of early March 2014, while the file /etc/init/ssh.override still exists, changing its contents does not allow SSH (actually the sshd daemon) to run on startup.

  • The recent builds (tested for 226, but possibly earlier) now support a new meta-flag persist.service.ssh, to allow SSH (sshd daemon) to re-start on startup.

Get to command prompt (on device)

adb shell

su - phablet

Start SSH, and set flag

sudo service ssh start

sudo setprop persist.service.ssh true

Restart device

sudo reboot

The SSH daemon should auto-start

sudo service ssh status

To disable SSH auto-start, change the flag:

sudo setprop persist.service.ssh false

share|improve this answer
why do you need to sudo everything after going su -? –  Octopus Jan 16 at 9:30
The line su - phablet changes the user to phablet, not super-user. It is generally best practice to use least privilege, so as to be less vulnerable to attack. –  david6 Jan 16 at 9:55

Try making it writable and reboot:

touch /userdata/.writable_image

Edit: When you build it use the --pending switch Updates to phablet-flash

Edit: System images now the recommended way to deploy and update Ubuntu Touch

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.