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,766
  • 15
  • 24
0

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

袁文涛
  • 735
  • 1
  • 10
  • 23