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.
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.
Try:
ssh-keygen -f ~/.ssh/id_rsa -P ""
That will not ask neither for destination file nor passphrase
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -m pem <<< y
is better;
duplicate question