Added option to specify public key; some detection logic if ssh-agent is running