Is there a way to automate the ssh-keygen
method in powershell? I'm trying to do it with the following code, but it requires the user to enter a password.
# Create your GitHub SSH Key
$MyEmailAddress = "[email protected]"
if (! (Test-Path ("~/.ssh/id_rsa_test"))){
ssh-keygen -t rsa -C "$MyEmailAddress" -f "id_rsa_test"
}
I tried entering the password switch, but then it complains that the password is null.
# either
ssh-keygen -t rsa -C "$MyEmailAddress" -f "id_rsa_test" -N ""
# or
ssh-keygen -t rsa -C "$MyEmailAddress" -f "id_rsa_test" -N "$null"
I don't want a password in my key.
-N ''
throws a validation error on Windows because -N isnull
. – Culletnull
validation error when maybe it shouldn't. I've posted an "issue" github.com/msysgit/msysgit/issues/132 – CulletENTER
through the[Type a passphrase]
section. help.github.com/articles/generating-ssh-keys – Cullet