I have the below shell commands to generate the ssh key and to add the public key to authorized keys. But, I want to redirect all the out put of this command to a file while I have to get the prompt generated by these commands to enter output.
ssh-keygen -f /home/$cu/.ssh/${ssh_key}_rsa -t rsa -N ''
# Add Public Key to authorized keys
ssh-copy-id -i /home/$cu/.ssh/${ssh_key}_rsa.pub $Linux_User@$Linux_Machine
Could you please provide your suggestions.
vitag doing here? I don't see anything in title or text that describes how an editor is involved).