Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH Key generation without 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.

ssh installation normal process

like image 741
Samir Anand Avatar asked Nov 21 '25 22:11

Samir Anand


1 Answers

Try:

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

That will not ask neither for destination file nor passphrase

like image 58
Raul Andres Avatar answered Nov 23 '25 11:11

Raul Andres



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!