0

I'm writing a cron job that SSHs into a remote server. Since I'm of course not going to be around to type in a password each time the cron job runs, I need to be able to SSH without a password. I followed the "First Method" instructions in the second reply on this page:

http://www.linuxquestions.org/questions/linux-newbie-8/ssh-with-password-533684/

That kind of worked, but now instead of being prompted for a password, I'm prompted for my passphrase.

I set up some other RSA stuff before to be able to access something on GitHub (which I still use) so there might be some interference coming from that.

1
  • 1
    If you're using this yourself, instead of a script, look into ssh-agent. It will allow you to enter your passphrase once for the session and is a bit more secure then having no passphrase. Commented Jun 7, 2011 at 18:09

1 Answer 1

3

When generating the keys, leave the pass phrase blank.

1
  • Oooooh, that's not my favorite answer to this question. Especially if we'e talking about a root login on the remote system, having the key passphrase-unsecured means that anybody who can gain access to your private key file on disk - which is often on a less-secure client system - can now log in carte-blanche as root. Kyle's comment above about ssh-agent is correct: you can use ssh-agent to ensure your key remains secure on disk, but functions at runtime. I am doing this for my own ssh-keyed cron tasks. Commented Jun 10, 2011 at 17:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.