vbnet example w/PutFile, regarding password and sshhostkey
1. The above example utilizes password, I am already able to
File.Copy("now.xml", "\\anotherserver\C$\somedir\now.xml")
I just want to do this same process securely, I assume I can use the VB.Net example that is here: https://winscp.net/eng/docs/library#vbnet
I have some issues with this code slice:
With sessionOptions
.Protocol = Protocol.Sftp
.HostName = "example.com"
.UserName = "user"
.Password = "mypassword"
.SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
End With
1. I don't want to hard code my password.
2. How do I generate this key?