The script command not only makes a record of what commands you run but also allows you to save the output generated so that you can examine it later or easily turn your command sequences into scripts ...
The command will move through a series of prompts. First, it will ask where you want to save the keys. Unless you are an expert, accept the default. This will create an “id_rsa” and an “id_rsa.pub” ...