Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. Dim sessionOptions As New SessionOptions
  2. With sessionOptions
  3. .Protocol = Protocol.Sftp
  4. .HostName = url
  5. .UserName = user
  6. .PortNumber = port
  7. If pass <> String.Empty Then
  8. .Password = pass
  9. End If
  10. If privatekeyfile <> String.Empty Then
  11. .SshPrivateKeyPath = privatekeyfile
  12. End If
  13. End With
  14.  
  15. sessionOptions.GiveUpSecurityAndAcceptAnySshHostKey = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement