Skip to content

Commit 6cb91f6

Browse files
authored
Update README.md
1 parent b3e704b commit 6cb91f6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ This project was inspired by **Sharp.SSH** library which was ported from java an
5858
* Windows Phone 8.0
5959
* Universal Windows Platform 10
6060

61+
##Usage
62+
Establish an SFTP connection using both password and public-key authentication:
63+
64+
```cs
65+
var connectionInfo = new ConnectionInfo("sftp.foo.com",
66+
"guest",
67+
new PasswordAuthenticationMethod("guest", "pwd"),
68+
new PrivateKeyAuthenticationMethod("rsa.key"));
69+
using (var client = new SftpClient(connectionInfo))
70+
{
71+
client.Connect();
72+
}
73+
74+
```
75+
6176
##Building SSH.NET
6277

6378
Software | net35 | net40 | netstandard1.3 | sl4 | sl5 | wp71 | wp8 | uap10.0 |

0 commit comments

Comments
 (0)