Hi there, I'm sure that will be able to help you with this plugin. Please explain what you mean by
4. # Generate Password
5. # Confirm Generated password
Also, you won't be able to use vi through PHP, you will just need to edit it on your server and then upload back to destination. Or, which is better (and is the only correct way IMHO), as will be local - create a shell script on destination server and call it by PHP with needed parameters. That will be faster and will guarantee that someone else won't overwrite your files in the process.
So, if interested, just contact me by chat and we will discuss everything.
Thanks