Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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.

share|improve this question
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. – Kyle Smith Jun 7 '11 at 18:09
up vote 4 down vote accepted

When generating the keys, leave the pass phrase blank.

share|improve this answer
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. – Jeff Albert Jun 10 '11 at 17:36

Your Answer


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.