Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've setup some keys to connect one server to another (periodically importintg data from one to another via some crontab).

My problem is that the passphrase is randomly asked by the system (I can work with it throughout the day, but then coming back later I get prompted again). Hence the cron stop working.

I never had trouble like this before. Is that the server importing that needs to be set, or is it the remote one ? I might lack some experience right here; thanks for any help/explanations.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Its quite difficult to work out your problem from your description, but at a guess, things are working as intended.

If you want to automate a task, you generally ensure the key does not have a passphrase on it. What is probably happening is that when you are logged in your passphrase is remembered by the system (ssh-agent or pageant are common programs to do this, no doubt there are others). I'd imagine when you log out your passphrase is being purged from memory, so you are prompted for it again.

The solution would be to use another key which does not have a passphrase attached.

share|improve this answer
    
That makes sense! I'll do it. as I'm here, I'm getting this -> "Could not open a connection to your authentication agent." now when I type ssh-add. Don't know what to think now.. –  Ben None Feb 11 '13 at 19:33
    
The way I do it is to append the public key to ~username/.ssh/authorized_keys on the box I'm trying to log in to (and if authorized_keys does not exist I create it). I confess to never having used ssh-add, but from the man page it interacts with an authentication agent which is not what you want. –  davidgo Feb 11 '13 at 20:20
    
That kind of s3cks… never had to use ssh-add before; but obviously, on this setup the passphrase is sticky. got to find out. –  Ben None Feb 11 '13 at 21:53

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.