Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want the computer like pageant, to show a SSH password prompt during boot time. I have my private keys stored in a Dropbox between 3 computers of which 1 is now Ubuntu.

I have googled for 2 hours and asked other people, but most people simply do not use private keys at all or use private keys without passwords and therefore do not need something like this. I however use my same private key at multiple locations and renew it every year. It must be password-protected because it's on multiple locations and on my Dropbox.

I found Seahorse, although I am no sure it does what I want it to do, but it gives segmentation faults on a fresh Ubuntu install while importing a PuTTy key exported to OpenSSH.

share|improve this question
add comment

migrated from serverfault.com Sep 15 '11 at 6:39

This question came from our site for professional system and network administrators.

3 Answers

You should check two things:

  1. If you are working on a recent linux disto like ubuntu, you should already have ssh-agent compatible key-manager running on your system. Open a shell (under X11) and check the value of SSH_AUTH_SOCK environment variable. If it is something like /tmp/keyring-WEuO6X/ssh, you are running Gnome Keyring. If it is like /tmp/ssh-XXXXXXXXXX/agent.<ppid>, you are running ssh-agent and so on. If it is empty, you have no key-manager running.

  2. I suppose you store keys in a non-default directory (i.e. not under ~/.ssh). So your key-manager does not see them. Look at ssh-agent manual and try to do a soft link under ~/.ssh dir to your key. Something like ln -s $HOME/dropbox/.../mydsakey $HOME/.ssh/id_rsa (the exact file names depend on your key type). This should work with any key-manager but, after you determined which are you using, you can check for a more clean solution in its manual.

In any case, most key-managers will non ask you the key-phrase at login time but when you try to use the key for the first time in the session.

[ -- post scriptum -- ]

The simplest method to verify if you have a key-manager running is to try to add manually a key:

ssh-add <key-file>
share|improve this answer
add comment

Many Linux distributions will start the ssh-agent from the login manager by default. So really all you have to do is add your key after it is started.

So you could simply setup a shortcut script or something like that to run ssh-add as soon as you login. How you do that depends on which desktop environment you are using.

You can install GUI tools like x11-ssh-askpass, so the password prompt is presented in the GUI.

You can do things with PAM to get it to prompt you for a password, or simply re-use your login password.

Seahorse or other password wallets (1) (2) built into some desktop environments should work as well. I have no idea why it is crashing for you. You would need to add more details.

share|improve this answer
add comment

Keychain is like ssh-agent (in fact, it is a sort of wrapper), but it keeps the same agent running across all processes.

keychain is a manager for ssh-agent, typically run from ~/.bash_profile. It allows your shells and cron jobs to share a single ssh-agent process. By default, the ssh-agent started by keychain is long-running and will continue to run, even after you have logged out from the system. If you want to change this behavior, take a look at the --clear and --timeout options, described below.

share|improve this answer
add comment

Your Answer

 
discard

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.