Automating “enter” keypresses for bash script generating ssh keys

后端 未结 5 742
说谎
说谎 2020-12-04 08:36

I would like to create script, which simply runs ssh-keygen -t rsa. But how to pass to it 3 times enter?

5条回答
  •  难免孤独
    2020-12-04 08:52

    a version with passphrase is:

    $ ssh-keygen -t rsa -b 4096 -C "comment" -P "examplePassphrase" -f "desired pathAndName" -q 
    
    • the -q is for silent

    Source is http://linux.die.net/man/1/ssh-keygen

提交回复
热议问题