Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

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

1 Answer 1

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

 
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.