Accessing Ubuntu Live-CD session without configuring a password

by Bryan Sutherland on August 15th, 2009
1 CommentComments

gnome-terminal icon

While in the process of performing some data transfer/recovery using my Jaunty Live-CD I decided that I didn’t really want to sit right beside the server while doing this work to save my sanity and hearing.

My attempts to enable remote desktop (using the Preferences > Remote Desktop applet) using Vino were hit and miss as I could only connect to the server 1 out of every 20 attempts.

As VNC was more frustration I figured I would just setup SSH access to the Live environment. As I didn’t want to setup a password to make things easier until reboot I used certificates.  The only prerequisites to do this are a network connection, a remote machine with ssh, pre-generated ssh keys on the remote machine (if you are missing this you can run `ssh-keygen` from a shell) and physical access to the Ubuntu Live-CD running box.

Here is the process I used:

From a terminal session (I used gnome-terminal)
ubuntu@ubuntu:~$ sudo apt-get install openssh-server
ubuntu@ubuntu:~$ sudo /etc/init.d/ssh start
ubuntu@ubuntu:~$ ssh-keygen # (you can accept defaults, password is optional here)
ubuntu@ubuntu:~$ scp remoteuser@192.168.0.2:.ssh/id_rsa.pub ./remote-id_rsa.pub
ubuntu@ubuntu:~$ cat remote-id_rsa.pub >> .ssh/authorized_keys
ubuntu@ubuntu:~$ chmod 600 .ssh/ ; chmod 600 .ssh/authorized_keys

Once these commands are done you will be able to login as ubuntu from the remote machine used without the need of a password.  Don’t forget to change the “remoteuser” and IP address to match your environment.

Tags: , , , ,
Categories: Computing Tips, Linux, Mac OS X, Tutorials

Comments

Feed
Trackback URL

Leave Comment

Commenting Options

Alternatively, you can create an avatar that will appear whenever you leave a comment on a Gravatar-enabled blog.