EDIT: As alluded to in the comments, although directly answering the question, this answer does leave you open to calculated risk. Ubuntu locks down root access and adds
sudo as a way to accomplish admin tasks for a reason.
Answering the Question
So, you want to login AS root via SSH so that you can run an update script.
You need to add your key to the root
authorized_keys file on the server.
On the Server
sudo su - root
ssh-keygen (to make sure root has the
.ssh directory etc)
- Add your public key to
sshd_config settings (
/etc/ssh/sshd_config) are correct one last time.
Ensure those settings take effect by restarting
service ssh restart
On the Client
- Login to the server as root using:
Note: If this doesn't work you'll need to do some further investigations.. Try posting the results of an
ssh -v root@yourserveraddress.
Recommended alternative approach
For security reasons the above approach, although answering the question, should not really be used as it opens up the root account to login. Although key based authentication is vastly more secure than passwords, it's still better practice to disallow any form of root login through SSH.
A better approach is to create a user with limited scope password-less
sudo commands and add key based SSH access to that user, as alluded to in other peoples answers.