If I want to overwrite existing SSH key file without typing y, then I would do this in bash:
echo "y" | ssh-keygen -f /home/wakatana/id_rsa -N ""
How can same be achieved using PowerShell? I've tried following:
Write-Host "y" | ssh-keygen.exe -f C:\Users\wakatana\Desktop\id_rsa -N """"
It won't show me Overwrite (y/n)?
dialog, but I does not rewrite existing key. What is the problem?