3

I am trying to write a Bash Script for generating ssh key. I am facing the issue of pressing enter while it ask for passfree .How will i make it work without pressing enter.

Follow below link it will ask for pressing enter.

ssh installation normal process

2 Answers2

3

Try:

   ssh-keygen -f ~/.ssh/id_rsa -P ""

That will not ask neither for destination file nor passphrase

Raul Andres
  • 3,710
  • 14
  • 23
0

ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -m pem <<< y is better; duplicate question

袁文涛
  • 604
  • 9
  • 19