Click here to Skip to main content
15,881,841 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to SSH connection & trying to connect SSH connection but it throws an exception " Inheritance security rules violated while overriding member: 'Renci.SshNet.Common.SshException.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden." Its urgent please help me
Posted
Comments
Member 11267758 27-Nov-14 3:56am    
Actually I am fresher and I am not getting any help.

1 solution

Renci has several classes, you can use them to connect to ssh. Below is the sample example.

Quote:
SshClient sshClient = new SshClient("localhost", "root", "")

var terminal = sshClient.RunCommand("service mysqld restart");
var output = terminal.Result;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900