The above script won't help. The issue is that the key is passphrase protected.
The above script won't help. The issue is that the key is passphrase protected.
Postfix problems? Come find me in #postfix on the freenode IRC network.
I'm 99% sure the key is not passphrase protected. Like I said, I can run the script from the terminal and it works fine without asking for any passwords to be entered.
Ok then, try my test script suggestion. I think something is messed up in the environment that cron is attempting to run the script in.
I've said this. Alternately he can hook the ssh-agent process.
Postfix problems? Come find me in #postfix on the freenode IRC network.
I added "cat /home/chris/.ssh/id_rsa" at the top, and it prints out this:
Code:~$ cat err.log ~ ~ -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,A7F6B957A1A54BCE ZYS/WQG2DATBjle0qOq+8HbEQV8geH/Q3SEOyVOmZ65qqtq2ZaADYqd3x5t1pJFT [snip] bOOvwzDSrV36k8zORG8tf7dUWK6LEUd2aQ0CIuzbHf5XyQh2M0L3zw== -----END RSA PRIVATE KEY----- Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). after ssh 0.dump: No such file or directory after scp ~
Ok, is the user the same on the remote machine? Try replacing "server" with "user@server". Where the user is that on the remote machine.
"server" is from ~/.ssh/config, changing to user@domain.com has the same result.
echo "$USER"
echo "$HOME"
echo "$SHELL"
echo "$PATH"
returns this:
/home/chris
/bin/bash
/usr/bin:/bin
$USER seems to be blank. I tried manually setting it to 'chris', but it had no effect.
I suspect a passphrase. The creds to unlock it are stored with your login keystore.
Postfix problems? Come find me in #postfix on the freenode IRC network.
On the remote machine, run this. See who cron is attempting to login as.
Code:sudo cat /var/log/auth.log | grep sshd | grep Failed
Bookmarks