Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Kb70

Kb70

Emulab FAQ: Using the Testbed: How can I login to users.emulab.net or a node in my experiment without providing my password?

Emulab FAQ: Using the Testbed: How can I login to users.emulab.net or a node in my experiment without providing my password?

To do this, you'll need to run an ssh-agent your machine, have a private key loaded into it, and have uploaded the public counterpart to Emulab (via the web interface). Once you are logged into an Emulab machine, your default Emulab keypair should allow you to ssh from one node to another without a password. More detailed instructions follow.

The first step, if you have not already done so, is to generate an encrypted ssh key pair. For instance.

mydesktop> cd ~/.ssh

mydesktop> ssh-keygen -f mykey Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in mykey. Your public key has been saved in mykey.pub. The key fingerprint is: 01:23:45:67:89:ab:cd:ef:01:23:45:67:89:ab:cd:ef user@host

Key generation might not be necessary if you already have a valid ssh key pair you want to reuse. You cannot create your encrypted ssh key on your Emulab users node; you must do it on your desktop machine!

At this point, you can load your new private key into the ssh-agent that is running on your desktop machine. You can do this by running a program called ssh-add. Note that some operating systems, like Mac OS X, will automatically run an ssh-agent for you and add a default set of keys. For more information about running ssh-agent and ssh-add, see the "more information" links at the end of this article.

The next step is to upload your public key (i.e. the file mykey.pub in the example above) to Emulab. Uploading is done through the Emulab WWW interface:

  1. Log in to your Emulab site.
  2. Follow the My Emulab link in the upper left of every page.
  3. Select the Profile tab (the rightmost of the three).
  4. Follow the Edit SSH Keys link (the second one in the box on the left).
  5. Use the Browse button on that page to enter the filename you saved your public key to (mykey.pub in the example above), and then select Add New Keys.

At this point, the authorized_keys file in your .ssh directory on your Emulab users node has been rebuilt. Do not modify this file directly; use the Emulab web interface to modify your keys!

For More Information

For more information on using ssh keypairs and ssh in general, please reference the ssh-keygen, ssh-add, and ssh man pages; ask your fellow project/group members; and/or talk to your local sysadmin.

This is a useful page about running and setting up ssh-agent: http://mah.everybody.org/docs/ssh

You might also find the following links for the more popular ssh clients useful: