Could not unlock ssh private key. Wrong password or password not available for cron.

Asked by A

 ubuntu 12.04 with KDE

I get the error message "Could not unlock ssh private key. Wrong password or password not available for cron." when trying to create a profile. (It's unclear why cron is relevant as I unticked the box related to it when I got this error, but the error persisted.)

I ran:
sudo -i
ssh-keygen -t rsa
ssh-copy-id -i /root/.ssh/id-rsa.pub REMOTE-USER@HOST
ssh REMOTE-USER@HOST # completed successfully
exit

Please note that my remote-user is NOT root.

Then I ran BIT as "kdesudo -c backintime-kde4" and attempted to setup a profile, and ran into the above error.

ssh-keygen -F <remote IP address>
returns the key.

Please advise.

Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
Back In Time Edit question
Assignee:
No assignee Edit question
Solved by:
Germar
Solved:
Last query:
Last reply:
Revision history for this message
Germar (germar) said :
#1

Did you set a passphrase for your key? It doesn't work for root to save passphrases. So you need to have a key without passphrase.

Is the correct key selected in Settings > General > Privat Key? This must be '/root/.ssh/id-rsa'

BTW ssh-keygen -F does return the HOST key of your remote machine. Not your private key.

Revision history for this message
A (publicface) said :
#2

I did not set a passphrase (how can this be verified?).
Private Key (next to cipher field) is "/root/.ssh/id_rsa"
Host is an IP address not a domain name,
port is 22,
User is root (should this be apb since that's who I want to login as on the server?)
Path is blank.
SSH Private Key is blank.
I've tried Save Password and Cache Password both ticked and unticked.
Autohost is ticked. Schedule is disabled.

I should also mention that the profile is not getting saved - I get the error message and so I have to cancel the profile creation because there's nothing left to do. I have to recreate the profile each time - but that's a different issue.

Thank you

Revision history for this message
Germar (germar) said :
#3

User must be the remote user. So 'apb' in your case.

BIT will not store new profiles or changes to profiles if they don't work.

Revision history for this message
A (publicface) said :
#4

Immediately after posting here, I changed the user to apb. The error persists.

As a test, as root I also tried: "rsync -t <filename> apb@<server ip>:tmp/"
which worked fine.

ssh apb@<server ip> also works fine as previously noted.

A password was not requested in either instance.

So I remain perplexed.

Revision history for this message
A (publicface) said :
#5

I refer you to https://answers.launchpad.net/backintime/+question/242392 wherein another user has the same issue with the result unresolved.

Revision history for this message
Germar (germar) said :
#6

You're right. I already forgot about that bug. Will look into it soon.

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
A (publicface) said :
#8

 I'm unable to use this application at this point, so this is a high priority critical error for me. I can give you an account on this machine so you can debug it if that would help?

Revision history for this message
Best Germar (germar) said :
#9

Thanks for that much trust to offer me an account. But that's not necessary.
I just didn't notice that you're not in notification list for bug #1276348. I provided a patch in there. Please give it a try.

Revision history for this message
A (publicface) said :
#10

Thanks Germar, that solved my question.