cat >ssh-keygen.exp << EOF
    #!/usr/bin/expect
    spawn ssh-keygen -t rsa
    expect {
    “(/home/gpadmin/.ssh/id_rsa):” {send “\r”;exp_continue}
    “empty for no passphrase):” {send “\r”;exp_continue}
    “Enter same passphrase again:” {send “\r”}
    }
    expect eof
    EOF