Differences
This shows you the differences between the selected revisions of the page.
2012-03-09 | 2012-03-09 | ||
library_perl, perl example (martin) | using object initializer (martin) | ||
Line 60: | Line 60: | ||
{ | { | ||
// Setup session options | // Setup session options | ||
- | SessionOptions sessionOptions = new SessionOptions(); | + | SessionOptions sessionOptions = new SessionOptions { |
- | sessionOptions.Protocol = Protocol.Sftp; | + | ···············Protocol = Protocol.Sftp, |
- | sessionOptions.HostName = "example.com"; | + | ···············HostName = "example.com", |
- | sessionOptions.UserName = "user"; | + | ···············UserName = "user", |
- | sessionOptions.Password = "mypassword"; | + | ···············Password = "mypassword", |
- | sessionOptions.SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"; | + | ···············SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" |
+ | }; | ||
using (Session session = new Session()) | using (Session session = new Session()) |