Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Using Tamir.SharpSsh;
- SshExec exec = new SshExec("ip address", "username", "password");
- exec.Connect();
- var output = exec.RunCommand("show vlan");
- exec.Close();
- using Renci.SshNet;
- using (var client = new SshClient(Host, UserName, Password))
- {
- try
- {
- client.Connect();
- }
- catch (Exception ex)
- {
- throw;
- }
- var command = client.CreateCommand("show vlan");
- return command.Execute();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement